LCOV - code coverage report
Current view: top level - home/czgdp18079/Quansight/scipy/build/scipy/linalg/_decomp_lu_cython.cpython-312-x86_64-linux-gnu.so.p - _decomp_lu_cython.c (source / functions) Hit Total Coverage
Test: coverage.info Lines: 2750 9992 27.5 %
Date: 2024-11-19 14:45:53 Functions: 86 315 27.3 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* Generated by Cython 3.0.11 */
       2             : 
       3             : #ifndef PY_SSIZE_T_CLEAN
       4             : #define PY_SSIZE_T_CLEAN
       5             : #endif /* PY_SSIZE_T_CLEAN */
       6             : #if defined(CYTHON_LIMITED_API) && 0
       7             :   #ifndef Py_LIMITED_API
       8             :     #if CYTHON_LIMITED_API+0 > 0x03030000
       9             :       #define Py_LIMITED_API CYTHON_LIMITED_API
      10             :     #else
      11             :       #define Py_LIMITED_API 0x03030000
      12             :     #endif
      13             :   #endif
      14             : #endif
      15             : 
      16             : #include "Python.h"
      17             : #ifndef Py_PYTHON_H
      18             :     #error Python headers needed to compile C extensions, please install development version of Python.
      19             : #elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
      20             :     #error Cython requires Python 2.7+ or Python 3.3+.
      21             : #else
      22             : #if defined(CYTHON_LIMITED_API) && CYTHON_LIMITED_API
      23             : #define __PYX_EXTRA_ABI_MODULE_NAME "limited"
      24             : #else
      25             : #define __PYX_EXTRA_ABI_MODULE_NAME ""
      26             : #endif
      27             : #define CYTHON_ABI "3_0_11" __PYX_EXTRA_ABI_MODULE_NAME
      28             : #define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
      29             : #define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."
      30             : #define CYTHON_HEX_VERSION 0x03000BF0
      31             : #define CYTHON_FUTURE_DIVISION 1
      32             : #include <stddef.h>
      33             : #ifndef offsetof
      34             :   #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
      35             : #endif
      36             : #if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS)
      37             :   #ifndef __stdcall
      38             :     #define __stdcall
      39             :   #endif
      40             :   #ifndef __cdecl
      41             :     #define __cdecl
      42             :   #endif
      43             :   #ifndef __fastcall
      44             :     #define __fastcall
      45             :   #endif
      46             : #endif
      47             : #ifndef DL_IMPORT
      48             :   #define DL_IMPORT(t) t
      49             : #endif
      50             : #ifndef DL_EXPORT
      51             :   #define DL_EXPORT(t) t
      52             : #endif
      53             : #define __PYX_COMMA ,
      54             : #ifndef HAVE_LONG_LONG
      55             :   #define HAVE_LONG_LONG
      56             : #endif
      57             : #ifndef PY_LONG_LONG
      58             :   #define PY_LONG_LONG LONG_LONG
      59             : #endif
      60             : #ifndef Py_HUGE_VAL
      61             :   #define Py_HUGE_VAL HUGE_VAL
      62             : #endif
      63             : #define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX
      64             : #if defined(GRAALVM_PYTHON)
      65             :   /* For very preliminary testing purposes. Most variables are set the same as PyPy.
      66             :      The existence of this section does not imply that anything works or is even tested */
      67             :   #define CYTHON_COMPILING_IN_PYPY 0
      68             :   #define CYTHON_COMPILING_IN_CPYTHON 0
      69             :   #define CYTHON_COMPILING_IN_LIMITED_API 0
      70             :   #define CYTHON_COMPILING_IN_GRAAL 1
      71             :   #define CYTHON_COMPILING_IN_NOGIL 0
      72             :   #undef CYTHON_USE_TYPE_SLOTS
      73             :   #define CYTHON_USE_TYPE_SLOTS 0
      74             :   #undef CYTHON_USE_TYPE_SPECS
      75             :   #define CYTHON_USE_TYPE_SPECS 0
      76             :   #undef CYTHON_USE_PYTYPE_LOOKUP
      77             :   #define CYTHON_USE_PYTYPE_LOOKUP 0
      78             :   #if PY_VERSION_HEX < 0x03050000
      79             :     #undef CYTHON_USE_ASYNC_SLOTS
      80             :     #define CYTHON_USE_ASYNC_SLOTS 0
      81             :   #elif !defined(CYTHON_USE_ASYNC_SLOTS)
      82             :     #define CYTHON_USE_ASYNC_SLOTS 1
      83             :   #endif
      84             :   #undef CYTHON_USE_PYLIST_INTERNALS
      85             :   #define CYTHON_USE_PYLIST_INTERNALS 0
      86             :   #undef CYTHON_USE_UNICODE_INTERNALS
      87             :   #define CYTHON_USE_UNICODE_INTERNALS 0
      88             :   #undef CYTHON_USE_UNICODE_WRITER
      89             :   #define CYTHON_USE_UNICODE_WRITER 0
      90             :   #undef CYTHON_USE_PYLONG_INTERNALS
      91             :   #define CYTHON_USE_PYLONG_INTERNALS 0
      92             :   #undef CYTHON_AVOID_BORROWED_REFS
      93             :   #define CYTHON_AVOID_BORROWED_REFS 1
      94             :   #undef CYTHON_ASSUME_SAFE_MACROS
      95             :   #define CYTHON_ASSUME_SAFE_MACROS 0
      96             :   #undef CYTHON_UNPACK_METHODS
      97             :   #define CYTHON_UNPACK_METHODS 0
      98             :   #undef CYTHON_FAST_THREAD_STATE
      99             :   #define CYTHON_FAST_THREAD_STATE 0
     100             :   #undef CYTHON_FAST_GIL
     101             :   #define CYTHON_FAST_GIL 0
     102             :   #undef CYTHON_METH_FASTCALL
     103             :   #define CYTHON_METH_FASTCALL 0
     104             :   #undef CYTHON_FAST_PYCALL
     105             :   #define CYTHON_FAST_PYCALL 0
     106             :   #ifndef CYTHON_PEP487_INIT_SUBCLASS
     107             :     #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
     108             :   #endif
     109             :   #undef CYTHON_PEP489_MULTI_PHASE_INIT
     110             :   #define CYTHON_PEP489_MULTI_PHASE_INIT 1
     111             :   #undef CYTHON_USE_MODULE_STATE
     112             :   #define CYTHON_USE_MODULE_STATE 0
     113             :   #undef CYTHON_USE_TP_FINALIZE
     114             :   #define CYTHON_USE_TP_FINALIZE 0
     115             :   #undef CYTHON_USE_DICT_VERSIONS
     116             :   #define CYTHON_USE_DICT_VERSIONS 0
     117             :   #undef CYTHON_USE_EXC_INFO_STACK
     118             :   #define CYTHON_USE_EXC_INFO_STACK 0
     119             :   #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
     120             :     #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
     121             :   #endif
     122             :   #undef CYTHON_USE_FREELISTS
     123             :   #define CYTHON_USE_FREELISTS 0
     124             : #elif defined(PYPY_VERSION)
     125             :   #define CYTHON_COMPILING_IN_PYPY 1
     126             :   #define CYTHON_COMPILING_IN_CPYTHON 0
     127             :   #define CYTHON_COMPILING_IN_LIMITED_API 0
     128             :   #define CYTHON_COMPILING_IN_GRAAL 0
     129             :   #define CYTHON_COMPILING_IN_NOGIL 0
     130             :   #undef CYTHON_USE_TYPE_SLOTS
     131             :   #define CYTHON_USE_TYPE_SLOTS 0
     132             :   #ifndef CYTHON_USE_TYPE_SPECS
     133             :     #define CYTHON_USE_TYPE_SPECS 0
     134             :   #endif
     135             :   #undef CYTHON_USE_PYTYPE_LOOKUP
     136             :   #define CYTHON_USE_PYTYPE_LOOKUP 0
     137             :   #if PY_VERSION_HEX < 0x03050000
     138             :     #undef CYTHON_USE_ASYNC_SLOTS
     139             :     #define CYTHON_USE_ASYNC_SLOTS 0
     140             :   #elif !defined(CYTHON_USE_ASYNC_SLOTS)
     141             :     #define CYTHON_USE_ASYNC_SLOTS 1
     142             :   #endif
     143             :   #undef CYTHON_USE_PYLIST_INTERNALS
     144             :   #define CYTHON_USE_PYLIST_INTERNALS 0
     145             :   #undef CYTHON_USE_UNICODE_INTERNALS
     146             :   #define CYTHON_USE_UNICODE_INTERNALS 0
     147             :   #undef CYTHON_USE_UNICODE_WRITER
     148             :   #define CYTHON_USE_UNICODE_WRITER 0
     149             :   #undef CYTHON_USE_PYLONG_INTERNALS
     150             :   #define CYTHON_USE_PYLONG_INTERNALS 0
     151             :   #undef CYTHON_AVOID_BORROWED_REFS
     152             :   #define CYTHON_AVOID_BORROWED_REFS 1
     153             :   #undef CYTHON_ASSUME_SAFE_MACROS
     154             :   #define CYTHON_ASSUME_SAFE_MACROS 0
     155             :   #undef CYTHON_UNPACK_METHODS
     156             :   #define CYTHON_UNPACK_METHODS 0
     157             :   #undef CYTHON_FAST_THREAD_STATE
     158             :   #define CYTHON_FAST_THREAD_STATE 0
     159             :   #undef CYTHON_FAST_GIL
     160             :   #define CYTHON_FAST_GIL 0
     161             :   #undef CYTHON_METH_FASTCALL
     162             :   #define CYTHON_METH_FASTCALL 0
     163             :   #undef CYTHON_FAST_PYCALL
     164             :   #define CYTHON_FAST_PYCALL 0
     165             :   #ifndef CYTHON_PEP487_INIT_SUBCLASS
     166             :     #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
     167             :   #endif
     168             :   #if PY_VERSION_HEX < 0x03090000
     169             :     #undef CYTHON_PEP489_MULTI_PHASE_INIT
     170             :     #define CYTHON_PEP489_MULTI_PHASE_INIT 0
     171             :   #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
     172             :     #define CYTHON_PEP489_MULTI_PHASE_INIT 1
     173             :   #endif
     174             :   #undef CYTHON_USE_MODULE_STATE
     175             :   #define CYTHON_USE_MODULE_STATE 0
     176             :   #undef CYTHON_USE_TP_FINALIZE
     177             :   #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00)
     178             :   #undef CYTHON_USE_DICT_VERSIONS
     179             :   #define CYTHON_USE_DICT_VERSIONS 0
     180             :   #undef CYTHON_USE_EXC_INFO_STACK
     181             :   #define CYTHON_USE_EXC_INFO_STACK 0
     182             :   #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
     183             :     #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
     184             :   #endif
     185             :   #undef CYTHON_USE_FREELISTS
     186             :   #define CYTHON_USE_FREELISTS 0
     187             : #elif defined(CYTHON_LIMITED_API)
     188             :   #ifdef Py_LIMITED_API
     189             :     #undef __PYX_LIMITED_VERSION_HEX
     190             :     #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API
     191             :   #endif
     192             :   #define CYTHON_COMPILING_IN_PYPY 0
     193             :   #define CYTHON_COMPILING_IN_CPYTHON 0
     194             :   #define CYTHON_COMPILING_IN_LIMITED_API 1
     195             :   #define CYTHON_COMPILING_IN_GRAAL 0
     196             :   #define CYTHON_COMPILING_IN_NOGIL 0
     197             :   #undef CYTHON_CLINE_IN_TRACEBACK
     198             :   #define CYTHON_CLINE_IN_TRACEBACK 0
     199             :   #undef CYTHON_USE_TYPE_SLOTS
     200             :   #define CYTHON_USE_TYPE_SLOTS 0
     201             :   #undef CYTHON_USE_TYPE_SPECS
     202             :   #define CYTHON_USE_TYPE_SPECS 1
     203             :   #undef CYTHON_USE_PYTYPE_LOOKUP
     204             :   #define CYTHON_USE_PYTYPE_LOOKUP 0
     205             :   #undef CYTHON_USE_ASYNC_SLOTS
     206             :   #define CYTHON_USE_ASYNC_SLOTS 0
     207             :   #undef CYTHON_USE_PYLIST_INTERNALS
     208             :   #define CYTHON_USE_PYLIST_INTERNALS 0
     209             :   #undef CYTHON_USE_UNICODE_INTERNALS
     210             :   #define CYTHON_USE_UNICODE_INTERNALS 0
     211             :   #ifndef CYTHON_USE_UNICODE_WRITER
     212             :     #define CYTHON_USE_UNICODE_WRITER 0
     213             :   #endif
     214             :   #undef CYTHON_USE_PYLONG_INTERNALS
     215             :   #define CYTHON_USE_PYLONG_INTERNALS 0
     216             :   #ifndef CYTHON_AVOID_BORROWED_REFS
     217             :     #define CYTHON_AVOID_BORROWED_REFS 0
     218             :   #endif
     219             :   #undef CYTHON_ASSUME_SAFE_MACROS
     220             :   #define CYTHON_ASSUME_SAFE_MACROS 0
     221             :   #undef CYTHON_UNPACK_METHODS
     222             :   #define CYTHON_UNPACK_METHODS 0
     223             :   #undef CYTHON_FAST_THREAD_STATE
     224             :   #define CYTHON_FAST_THREAD_STATE 0
     225             :   #undef CYTHON_FAST_GIL
     226             :   #define CYTHON_FAST_GIL 0
     227             :   #undef CYTHON_METH_FASTCALL
     228             :   #define CYTHON_METH_FASTCALL 0
     229             :   #undef CYTHON_FAST_PYCALL
     230             :   #define CYTHON_FAST_PYCALL 0
     231             :   #ifndef CYTHON_PEP487_INIT_SUBCLASS
     232             :     #define CYTHON_PEP487_INIT_SUBCLASS 1
     233             :   #endif
     234             :   #undef CYTHON_PEP489_MULTI_PHASE_INIT
     235             :   #define CYTHON_PEP489_MULTI_PHASE_INIT 0
     236             :   #undef CYTHON_USE_MODULE_STATE
     237             :   #define CYTHON_USE_MODULE_STATE 1
     238             :   #ifndef CYTHON_USE_TP_FINALIZE
     239             :     #define CYTHON_USE_TP_FINALIZE 0
     240             :   #endif
     241             :   #undef CYTHON_USE_DICT_VERSIONS
     242             :   #define CYTHON_USE_DICT_VERSIONS 0
     243             :   #undef CYTHON_USE_EXC_INFO_STACK
     244             :   #define CYTHON_USE_EXC_INFO_STACK 0
     245             :   #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
     246             :     #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
     247             :   #endif
     248             :   #undef CYTHON_USE_FREELISTS
     249             :   #define CYTHON_USE_FREELISTS 0
     250             : #elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL)
     251             :   #define CYTHON_COMPILING_IN_PYPY 0
     252             :   #define CYTHON_COMPILING_IN_CPYTHON 0
     253             :   #define CYTHON_COMPILING_IN_LIMITED_API 0
     254             :   #define CYTHON_COMPILING_IN_GRAAL 0
     255             :   #define CYTHON_COMPILING_IN_NOGIL 1
     256             :   #ifndef CYTHON_USE_TYPE_SLOTS
     257             :     #define CYTHON_USE_TYPE_SLOTS 1
     258             :   #endif
     259             :   #ifndef CYTHON_USE_TYPE_SPECS
     260             :     #define CYTHON_USE_TYPE_SPECS 0
     261             :   #endif
     262             :   #undef CYTHON_USE_PYTYPE_LOOKUP
     263             :   #define CYTHON_USE_PYTYPE_LOOKUP 0
     264             :   #ifndef CYTHON_USE_ASYNC_SLOTS
     265             :     #define CYTHON_USE_ASYNC_SLOTS 1
     266             :   #endif
     267             :   #ifndef CYTHON_USE_PYLONG_INTERNALS
     268             :     #define CYTHON_USE_PYLONG_INTERNALS 0
     269             :   #endif
     270             :   #undef CYTHON_USE_PYLIST_INTERNALS
     271             :   #define CYTHON_USE_PYLIST_INTERNALS 0
     272             :   #ifndef CYTHON_USE_UNICODE_INTERNALS
     273             :     #define CYTHON_USE_UNICODE_INTERNALS 1
     274             :   #endif
     275             :   #undef CYTHON_USE_UNICODE_WRITER
     276             :   #define CYTHON_USE_UNICODE_WRITER 0
     277             :   #ifndef CYTHON_AVOID_BORROWED_REFS
     278             :     #define CYTHON_AVOID_BORROWED_REFS 0
     279             :   #endif
     280             :   #ifndef CYTHON_ASSUME_SAFE_MACROS
     281             :     #define CYTHON_ASSUME_SAFE_MACROS 1
     282             :   #endif
     283             :   #ifndef CYTHON_UNPACK_METHODS
     284             :     #define CYTHON_UNPACK_METHODS 1
     285             :   #endif
     286             :   #undef CYTHON_FAST_THREAD_STATE
     287             :   #define CYTHON_FAST_THREAD_STATE 0
     288             :   #undef CYTHON_FAST_GIL
     289             :   #define CYTHON_FAST_GIL 0
     290             :   #ifndef CYTHON_METH_FASTCALL
     291             :     #define CYTHON_METH_FASTCALL 1
     292             :   #endif
     293             :   #undef CYTHON_FAST_PYCALL
     294             :   #define CYTHON_FAST_PYCALL 0
     295             :   #ifndef CYTHON_PEP487_INIT_SUBCLASS
     296             :     #define CYTHON_PEP487_INIT_SUBCLASS 1
     297             :   #endif
     298             :   #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
     299             :     #define CYTHON_PEP489_MULTI_PHASE_INIT 1
     300             :   #endif
     301             :   #ifndef CYTHON_USE_MODULE_STATE
     302             :     #define CYTHON_USE_MODULE_STATE 0
     303             :   #endif
     304             :   #ifndef CYTHON_USE_TP_FINALIZE
     305             :     #define CYTHON_USE_TP_FINALIZE 1
     306             :   #endif
     307             :   #undef CYTHON_USE_DICT_VERSIONS
     308             :   #define CYTHON_USE_DICT_VERSIONS 0
     309             :   #undef CYTHON_USE_EXC_INFO_STACK
     310             :   #define CYTHON_USE_EXC_INFO_STACK 0
     311             :   #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
     312             :     #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
     313             :   #endif
     314             :   #ifndef CYTHON_USE_FREELISTS
     315             :     #define CYTHON_USE_FREELISTS 0
     316             :   #endif
     317             : #else
     318             :   #define CYTHON_COMPILING_IN_PYPY 0
     319             :   #define CYTHON_COMPILING_IN_CPYTHON 1
     320             :   #define CYTHON_COMPILING_IN_LIMITED_API 0
     321             :   #define CYTHON_COMPILING_IN_GRAAL 0
     322             :   #define CYTHON_COMPILING_IN_NOGIL 0
     323             :   #ifndef CYTHON_USE_TYPE_SLOTS
     324             :     #define CYTHON_USE_TYPE_SLOTS 1
     325             :   #endif
     326             :   #ifndef CYTHON_USE_TYPE_SPECS
     327             :     #define CYTHON_USE_TYPE_SPECS 0
     328             :   #endif
     329             :   #ifndef CYTHON_USE_PYTYPE_LOOKUP
     330             :     #define CYTHON_USE_PYTYPE_LOOKUP 1
     331             :   #endif
     332             :   #if PY_MAJOR_VERSION < 3
     333             :     #undef CYTHON_USE_ASYNC_SLOTS
     334             :     #define CYTHON_USE_ASYNC_SLOTS 0
     335             :   #elif !defined(CYTHON_USE_ASYNC_SLOTS)
     336             :     #define CYTHON_USE_ASYNC_SLOTS 1
     337             :   #endif
     338             :   #ifndef CYTHON_USE_PYLONG_INTERNALS
     339             :     #define CYTHON_USE_PYLONG_INTERNALS 1
     340             :   #endif
     341             :   #ifndef CYTHON_USE_PYLIST_INTERNALS
     342             :     #define CYTHON_USE_PYLIST_INTERNALS 1
     343             :   #endif
     344             :   #ifndef CYTHON_USE_UNICODE_INTERNALS
     345             :     #define CYTHON_USE_UNICODE_INTERNALS 1
     346             :   #endif
     347             :   #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
     348             :     #undef CYTHON_USE_UNICODE_WRITER
     349             :     #define CYTHON_USE_UNICODE_WRITER 0
     350             :   #elif !defined(CYTHON_USE_UNICODE_WRITER)
     351             :     #define CYTHON_USE_UNICODE_WRITER 1
     352             :   #endif
     353             :   #ifndef CYTHON_AVOID_BORROWED_REFS
     354             :     #define CYTHON_AVOID_BORROWED_REFS 0
     355             :   #endif
     356             :   #ifndef CYTHON_ASSUME_SAFE_MACROS
     357             :     #define CYTHON_ASSUME_SAFE_MACROS 1
     358             :   #endif
     359             :   #ifndef CYTHON_UNPACK_METHODS
     360             :     #define CYTHON_UNPACK_METHODS 1
     361             :   #endif
     362             :   #ifndef CYTHON_FAST_THREAD_STATE
     363             :     #define CYTHON_FAST_THREAD_STATE 1
     364             :   #endif
     365             :   #ifndef CYTHON_FAST_GIL
     366             :     #define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000 && PY_VERSION_HEX < 0x030C00A6)
     367             :   #endif
     368             :   #ifndef CYTHON_METH_FASTCALL
     369             :     #define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1)
     370             :   #endif
     371             :   #ifndef CYTHON_FAST_PYCALL
     372             :     #define CYTHON_FAST_PYCALL 1
     373             :   #endif
     374             :   #ifndef CYTHON_PEP487_INIT_SUBCLASS
     375             :     #define CYTHON_PEP487_INIT_SUBCLASS 1
     376             :   #endif
     377             :   #if PY_VERSION_HEX < 0x03050000
     378             :     #undef CYTHON_PEP489_MULTI_PHASE_INIT
     379             :     #define CYTHON_PEP489_MULTI_PHASE_INIT 0
     380             :   #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
     381             :     #define CYTHON_PEP489_MULTI_PHASE_INIT 1
     382             :   #endif
     383             :   #ifndef CYTHON_USE_MODULE_STATE
     384             :     #define CYTHON_USE_MODULE_STATE 0
     385             :   #endif
     386             :   #if PY_VERSION_HEX < 0x030400a1
     387             :     #undef CYTHON_USE_TP_FINALIZE
     388             :     #define CYTHON_USE_TP_FINALIZE 0
     389             :   #elif !defined(CYTHON_USE_TP_FINALIZE)
     390             :     #define CYTHON_USE_TP_FINALIZE 1
     391             :   #endif
     392             :   #if PY_VERSION_HEX < 0x030600B1
     393             :     #undef CYTHON_USE_DICT_VERSIONS
     394             :     #define CYTHON_USE_DICT_VERSIONS 0
     395             :   #elif !defined(CYTHON_USE_DICT_VERSIONS)
     396             :     #define CYTHON_USE_DICT_VERSIONS  (PY_VERSION_HEX < 0x030C00A5)
     397             :   #endif
     398             :   #if PY_VERSION_HEX < 0x030700A3
     399             :     #undef CYTHON_USE_EXC_INFO_STACK
     400             :     #define CYTHON_USE_EXC_INFO_STACK 0
     401             :   #elif !defined(CYTHON_USE_EXC_INFO_STACK)
     402             :     #define CYTHON_USE_EXC_INFO_STACK 1
     403             :   #endif
     404             :   #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
     405             :     #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
     406             :   #endif
     407             :   #ifndef CYTHON_USE_FREELISTS
     408             :     #define CYTHON_USE_FREELISTS 1
     409             :   #endif
     410             : #endif
     411             : #if !defined(CYTHON_FAST_PYCCALL)
     412             : #define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
     413             : #endif
     414             : #if !defined(CYTHON_VECTORCALL)
     415             : #define CYTHON_VECTORCALL  (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1)
     416             : #endif
     417             : #define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1)
     418             : #if CYTHON_USE_PYLONG_INTERNALS
     419             :   #if PY_MAJOR_VERSION < 3
     420             :     #include "longintrepr.h"
     421             :   #endif
     422             :   #undef SHIFT
     423             :   #undef BASE
     424             :   #undef MASK
     425             :   #ifdef SIZEOF_VOID_P
     426             :     enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
     427             :   #endif
     428             : #endif
     429             : #ifndef __has_attribute
     430             :   #define __has_attribute(x) 0
     431             : #endif
     432             : #ifndef __has_cpp_attribute
     433             :   #define __has_cpp_attribute(x) 0
     434             : #endif
     435             : #ifndef CYTHON_RESTRICT
     436             :   #if defined(__GNUC__)
     437             :     #define CYTHON_RESTRICT __restrict__
     438             :   #elif defined(_MSC_VER) && _MSC_VER >= 1400
     439             :     #define CYTHON_RESTRICT __restrict
     440             :   #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
     441             :     #define CYTHON_RESTRICT restrict
     442             :   #else
     443             :     #define CYTHON_RESTRICT
     444             :   #endif
     445             : #endif
     446             : #ifndef CYTHON_UNUSED
     447             :   #if defined(__cplusplus)
     448             :     /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17
     449             :      * but leads to warnings with -pedantic, since it is a C++17 feature */
     450             :     #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
     451             :       #if __has_cpp_attribute(maybe_unused)
     452             :         #define CYTHON_UNUSED [[maybe_unused]]
     453             :       #endif
     454             :     #endif
     455             :   #endif
     456             : #endif
     457             : #ifndef CYTHON_UNUSED
     458             : # if defined(__GNUC__)
     459             : #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
     460             : #     define CYTHON_UNUSED __attribute__ ((__unused__))
     461             : #   else
     462             : #     define CYTHON_UNUSED
     463             : #   endif
     464             : # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
     465             : #   define CYTHON_UNUSED __attribute__ ((__unused__))
     466             : # else
     467             : #   define CYTHON_UNUSED
     468             : # endif
     469             : #endif
     470             : #ifndef CYTHON_UNUSED_VAR
     471             : #  if defined(__cplusplus)
     472             :      template<class T> void CYTHON_UNUSED_VAR( const T& ) { }
     473             : #  else
     474             : #    define CYTHON_UNUSED_VAR(x) (void)(x)
     475             : #  endif
     476             : #endif
     477             : #ifndef CYTHON_MAYBE_UNUSED_VAR
     478             :   #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
     479             : #endif
     480             : #ifndef CYTHON_NCP_UNUSED
     481             : # if CYTHON_COMPILING_IN_CPYTHON
     482             : #  define CYTHON_NCP_UNUSED
     483             : # else
     484             : #  define CYTHON_NCP_UNUSED CYTHON_UNUSED
     485             : # endif
     486             : #endif
     487             : #ifndef CYTHON_USE_CPP_STD_MOVE
     488             :   #if defined(__cplusplus) && (\
     489             :     __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600))
     490             :     #define CYTHON_USE_CPP_STD_MOVE 1
     491             :   #else
     492             :     #define CYTHON_USE_CPP_STD_MOVE 0
     493             :   #endif
     494             : #endif
     495             : #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
     496             : #ifdef _MSC_VER
     497             :     #ifndef _MSC_STDINT_H_
     498             :         #if _MSC_VER < 1300
     499             :             typedef unsigned char     uint8_t;
     500             :             typedef unsigned short    uint16_t;
     501             :             typedef unsigned int      uint32_t;
     502             :         #else
     503             :             typedef unsigned __int8   uint8_t;
     504             :             typedef unsigned __int16  uint16_t;
     505             :             typedef unsigned __int32  uint32_t;
     506             :         #endif
     507             :     #endif
     508             :     #if _MSC_VER < 1300
     509             :         #ifdef _WIN64
     510             :             typedef unsigned long long  __pyx_uintptr_t;
     511             :         #else
     512             :             typedef unsigned int        __pyx_uintptr_t;
     513             :         #endif
     514             :     #else
     515             :         #ifdef _WIN64
     516             :             typedef unsigned __int64    __pyx_uintptr_t;
     517             :         #else
     518             :             typedef unsigned __int32    __pyx_uintptr_t;
     519             :         #endif
     520             :     #endif
     521             : #else
     522             :     #include <stdint.h>
     523             :     typedef uintptr_t  __pyx_uintptr_t;
     524             : #endif
     525             : #ifndef CYTHON_FALLTHROUGH
     526             :   #if defined(__cplusplus)
     527             :     /* for clang __has_cpp_attribute(fallthrough) is true even before C++17
     528             :      * but leads to warnings with -pedantic, since it is a C++17 feature */
     529             :     #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
     530             :       #if __has_cpp_attribute(fallthrough)
     531             :         #define CYTHON_FALLTHROUGH [[fallthrough]]
     532             :       #endif
     533             :     #endif
     534             :     #ifndef CYTHON_FALLTHROUGH
     535             :       #if __has_cpp_attribute(clang::fallthrough)
     536             :         #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
     537             :       #elif __has_cpp_attribute(gnu::fallthrough)
     538             :         #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
     539             :       #endif
     540             :     #endif
     541             :   #endif
     542             :   #ifndef CYTHON_FALLTHROUGH
     543             :     #if __has_attribute(fallthrough)
     544             :       #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
     545             :     #else
     546             :       #define CYTHON_FALLTHROUGH
     547             :     #endif
     548             :   #endif
     549             :   #if defined(__clang__) && defined(__apple_build_version__)
     550             :     #if __apple_build_version__ < 7000000
     551             :       #undef  CYTHON_FALLTHROUGH
     552             :       #define CYTHON_FALLTHROUGH
     553             :     #endif
     554             :   #endif
     555             : #endif
     556             : #ifdef __cplusplus
     557             :   template <typename T>
     558             :   struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);};
     559             :   #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value)
     560             : #else
     561             :   #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0)
     562             : #endif
     563             : #if CYTHON_COMPILING_IN_PYPY == 1
     564             :   #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000)
     565             : #else
     566             :   #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000)
     567             : #endif
     568             : #define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer))
     569             : 
     570             : #ifndef CYTHON_INLINE
     571             :   #if defined(__clang__)
     572             :     #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
     573             :   #elif defined(__GNUC__)
     574             :     #define CYTHON_INLINE __inline__
     575             :   #elif defined(_MSC_VER)
     576             :     #define CYTHON_INLINE __inline
     577             :   #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
     578             :     #define CYTHON_INLINE inline
     579             :   #else
     580             :     #define CYTHON_INLINE
     581             :   #endif
     582             : #endif
     583             : 
     584             : #define __PYX_BUILD_PY_SSIZE_T "n"
     585             : #define CYTHON_FORMAT_SSIZE_T "z"
     586             : #if PY_MAJOR_VERSION < 3
     587             :   #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
     588             :   #define __Pyx_DefaultClassType PyClass_Type
     589             :   #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
     590             :           PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
     591             : #else
     592             :   #define __Pyx_BUILTIN_MODULE_NAME "builtins"
     593             :   #define __Pyx_DefaultClassType PyType_Type
     594             : #if CYTHON_COMPILING_IN_LIMITED_API
     595             :     static CYTHON_INLINE PyObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f,
     596             :                                                     PyObject *code, PyObject *c, PyObject* n, PyObject *v,
     597             :                                                     PyObject *fv, PyObject *cell, PyObject* fn,
     598             :                                                     PyObject *name, int fline, PyObject *lnos) {
     599             :         PyObject *exception_table = NULL;
     600             :         PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
     601             :         #if __PYX_LIMITED_VERSION_HEX < 0x030B0000
     602             :         PyObject *version_info;
     603             :         PyObject *py_minor_version = NULL;
     604             :         #endif
     605             :         long minor_version = 0;
     606             :         PyObject *type, *value, *traceback;
     607             :         PyErr_Fetch(&type, &value, &traceback);
     608             :         #if __PYX_LIMITED_VERSION_HEX >= 0x030B0000
     609             :         minor_version = 11;
     610             :         #else
     611             :         if (!(version_info = PySys_GetObject("version_info"))) goto end;
     612             :         if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
     613             :         minor_version = PyLong_AsLong(py_minor_version);
     614             :         Py_DECREF(py_minor_version);
     615             :         if (minor_version == -1 && PyErr_Occurred()) goto end;
     616             :         #endif
     617             :         if (!(types_module = PyImport_ImportModule("types"))) goto end;
     618             :         if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end;
     619             :         if (minor_version <= 7) {
     620             :             (void)p;
     621             :             result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOO", a, k, l, s, f, code,
     622             :                           c, n, v, fn, name, fline, lnos, fv, cell);
     623             :         } else if (minor_version <= 10) {
     624             :             result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOO", a,p, k, l, s, f, code,
     625             :                           c, n, v, fn, name, fline, lnos, fv, cell);
     626             :         } else {
     627             :             if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end;
     628             :             result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOO", a,p, k, l, s, f, code,
     629             :                           c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
     630             :         }
     631             :     end:
     632             :         Py_XDECREF(code_type);
     633             :         Py_XDECREF(exception_table);
     634             :         Py_XDECREF(types_module);
     635             :         if (type) {
     636             :             PyErr_Restore(type, value, traceback);
     637             :         }
     638             :         return result;
     639             :     }
     640             :     #ifndef CO_OPTIMIZED
     641             :     #define CO_OPTIMIZED 0x0001
     642             :     #endif
     643             :     #ifndef CO_NEWLOCALS
     644             :     #define CO_NEWLOCALS 0x0002
     645             :     #endif
     646             :     #ifndef CO_VARARGS
     647             :     #define CO_VARARGS 0x0004
     648             :     #endif
     649             :     #ifndef CO_VARKEYWORDS
     650             :     #define CO_VARKEYWORDS 0x0008
     651             :     #endif
     652             :     #ifndef CO_ASYNC_GENERATOR
     653             :     #define CO_ASYNC_GENERATOR 0x0200
     654             :     #endif
     655             :     #ifndef CO_GENERATOR
     656             :     #define CO_GENERATOR 0x0020
     657             :     #endif
     658             :     #ifndef CO_COROUTINE
     659             :     #define CO_COROUTINE 0x0080
     660             :     #endif
     661             : #elif PY_VERSION_HEX >= 0x030B0000
     662           2 :   static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f,
     663             :                                                     PyObject *code, PyObject *c, PyObject* n, PyObject *v,
     664             :                                                     PyObject *fv, PyObject *cell, PyObject* fn,
     665             :                                                     PyObject *name, int fline, PyObject *lnos) {
     666           2 :     PyCodeObject *result;
     667           2 :     PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0);
     668           2 :     if (!empty_bytes) return NULL;
     669           2 :     result =
     670             :       #if PY_VERSION_HEX >= 0x030C0000
     671           2 :         PyUnstable_Code_NewWithPosOnlyArgs
     672             :       #else
     673             :         PyCode_NewWithPosOnlyArgs
     674             :       #endif
     675             :         (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, empty_bytes);
     676           2 :     Py_DECREF(empty_bytes);
     677             :     return result;
     678             :   }
     679             : #elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY
     680             :   #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
     681             :           PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
     682             : #else
     683             :   #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
     684             :           PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
     685             : #endif
     686             : #endif
     687             : #if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE)
     688             :   #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type)
     689             : #else
     690             :   #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type))
     691             : #endif
     692             : #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is)
     693             :   #define __Pyx_Py_Is(x, y)  Py_Is(x, y)
     694             : #else
     695             :   #define __Pyx_Py_Is(x, y) ((x) == (y))
     696             : #endif
     697             : #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
     698             :   #define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
     699             : #else
     700             :   #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
     701             : #endif
     702             : #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
     703             :   #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
     704             : #else
     705             :   #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
     706             : #endif
     707             : #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
     708             :   #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
     709             : #else
     710             :   #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
     711             : #endif
     712             : #define __Pyx_NoneAsNull(obj)  (__Pyx_Py_IsNone(obj) ? NULL : (obj))
     713             : #if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY
     714             :   #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
     715             : #else
     716             :   #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
     717             : #endif
     718             : #ifndef CO_COROUTINE
     719             :   #define CO_COROUTINE 0x80
     720             : #endif
     721             : #ifndef CO_ASYNC_GENERATOR
     722             :   #define CO_ASYNC_GENERATOR 0x200
     723             : #endif
     724             : #ifndef Py_TPFLAGS_CHECKTYPES
     725             :   #define Py_TPFLAGS_CHECKTYPES 0
     726             : #endif
     727             : #ifndef Py_TPFLAGS_HAVE_INDEX
     728             :   #define Py_TPFLAGS_HAVE_INDEX 0
     729             : #endif
     730             : #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
     731             :   #define Py_TPFLAGS_HAVE_NEWBUFFER 0
     732             : #endif
     733             : #ifndef Py_TPFLAGS_HAVE_FINALIZE
     734             :   #define Py_TPFLAGS_HAVE_FINALIZE 0
     735             : #endif
     736             : #ifndef Py_TPFLAGS_SEQUENCE
     737             :   #define Py_TPFLAGS_SEQUENCE 0
     738             : #endif
     739             : #ifndef Py_TPFLAGS_MAPPING
     740             :   #define Py_TPFLAGS_MAPPING 0
     741             : #endif
     742             : #ifndef METH_STACKLESS
     743             :   #define METH_STACKLESS 0
     744             : #endif
     745             : #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
     746             :   #ifndef METH_FASTCALL
     747             :      #define METH_FASTCALL 0x80
     748             :   #endif
     749             :   typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
     750             :   typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
     751             :                                                           Py_ssize_t nargs, PyObject *kwnames);
     752             : #else
     753             :   #if PY_VERSION_HEX >= 0x030d00A4
     754             :   #  define __Pyx_PyCFunctionFast PyCFunctionFast
     755             :   #  define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
     756             :   #else
     757             :   #  define __Pyx_PyCFunctionFast _PyCFunctionFast
     758             :   #  define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
     759             :   #endif
     760             : #endif
     761             : #if CYTHON_METH_FASTCALL
     762             :   #define __Pyx_METH_FASTCALL METH_FASTCALL
     763             :   #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
     764             :   #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
     765             : #else
     766             :   #define __Pyx_METH_FASTCALL METH_VARARGS
     767             :   #define __Pyx_PyCFunction_FastCall PyCFunction
     768             :   #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
     769             : #endif
     770             : #if CYTHON_VECTORCALL
     771             :   #define __pyx_vectorcallfunc vectorcallfunc
     772             :   #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  PY_VECTORCALL_ARGUMENTS_OFFSET
     773             :   #define __Pyx_PyVectorcall_NARGS(n)  PyVectorcall_NARGS((size_t)(n))
     774             : #elif CYTHON_BACKPORT_VECTORCALL
     775             :   typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args,
     776             :                                             size_t nargsf, PyObject *kwnames);
     777             :   #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  ((size_t)1 << (8 * sizeof(size_t) - 1))
     778             :   #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET))
     779             : #else
     780             :   #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  0
     781             :   #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(n))
     782             : #endif
     783             : #if PY_MAJOR_VERSION >= 0x030900B1
     784             : #define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_CheckExact(func)
     785             : #else
     786             : #define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_Check(func)
     787             : #endif
     788             : #define __Pyx_CyOrPyCFunction_Check(func)  PyCFunction_Check(func)
     789             : #if CYTHON_COMPILING_IN_CPYTHON
     790             : #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  (((PyCFunctionObject*)(func))->m_ml->ml_meth)
     791             : #elif !CYTHON_COMPILING_IN_LIMITED_API
     792             : #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  PyCFunction_GET_FUNCTION(func)
     793             : #endif
     794             : #if CYTHON_COMPILING_IN_CPYTHON
     795             : #define __Pyx_CyOrPyCFunction_GET_FLAGS(func)  (((PyCFunctionObject*)(func))->m_ml->ml_flags)
     796           0 : static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) {
     797           0 :     return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self;
     798             : }
     799             : #endif
     800             : static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void *cfunc) {
     801             : #if CYTHON_COMPILING_IN_LIMITED_API
     802             :     return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
     803             : #else
     804             :     return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
     805             : #endif
     806             : }
     807             : #define __Pyx_IsSameCFunction(func, cfunc)   __Pyx__IsSameCFunction(func, cfunc)
     808             : #if __PYX_LIMITED_VERSION_HEX < 0x030900B1
     809             :   #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  ((void)m, PyType_FromSpecWithBases(s, b))
     810             :   typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *);
     811             : #else
     812             :   #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  PyType_FromModuleAndSpec(m, s, b)
     813             :   #define __Pyx_PyCMethod  PyCMethod
     814             : #endif
     815             : #ifndef METH_METHOD
     816             :   #define METH_METHOD 0x200
     817             : #endif
     818             : #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
     819             :   #define PyObject_Malloc(s)   PyMem_Malloc(s)
     820             :   #define PyObject_Free(p)     PyMem_Free(p)
     821             :   #define PyObject_Realloc(p)  PyMem_Realloc(p)
     822             : #endif
     823             : #if CYTHON_COMPILING_IN_LIMITED_API
     824             :   #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
     825             :   #define __Pyx_PyFrame_SetLineNumber(frame, lineno)
     826             : #else
     827             :   #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
     828             :   #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
     829             : #endif
     830             : #if CYTHON_COMPILING_IN_LIMITED_API
     831             :   #define __Pyx_PyThreadState_Current PyThreadState_Get()
     832             : #elif !CYTHON_FAST_THREAD_STATE
     833             :   #define __Pyx_PyThreadState_Current PyThreadState_GET()
     834             : #elif PY_VERSION_HEX >= 0x030d00A1
     835             :   #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked()
     836             : #elif PY_VERSION_HEX >= 0x03060000
     837             :   #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
     838             : #elif PY_VERSION_HEX >= 0x03000000
     839             :   #define __Pyx_PyThreadState_Current PyThreadState_GET()
     840             : #else
     841             :   #define __Pyx_PyThreadState_Current _PyThreadState_Current
     842             : #endif
     843             : #if CYTHON_COMPILING_IN_LIMITED_API
     844             : static CYTHON_INLINE void *__Pyx_PyModule_GetState(PyObject *op)
     845             : {
     846             :     void *result;
     847             :     result = PyModule_GetState(op);
     848             :     if (!result)
     849             :         Py_FatalError("Couldn't find the module state");
     850             :     return result;
     851             : }
     852             : #endif
     853             : #define __Pyx_PyObject_GetSlot(obj, name, func_ctype)  __Pyx_PyType_GetSlot(Py_TYPE(obj), name, func_ctype)
     854             : #if CYTHON_COMPILING_IN_LIMITED_API
     855             :   #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((func_ctype) PyType_GetSlot((type), Py_##name))
     856             : #else
     857             :   #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((type)->name)
     858             : #endif
     859             : #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
     860             : #include "pythread.h"
     861             : #define Py_tss_NEEDS_INIT 0
     862             : typedef int Py_tss_t;
     863             : static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
     864             :   *key = PyThread_create_key();
     865             :   return 0;
     866             : }
     867             : static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
     868             :   Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
     869             :   *key = Py_tss_NEEDS_INIT;
     870             :   return key;
     871             : }
     872             : static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
     873             :   PyObject_Free(key);
     874             : }
     875             : static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
     876             :   return *key != Py_tss_NEEDS_INIT;
     877             : }
     878             : static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
     879             :   PyThread_delete_key(*key);
     880             :   *key = Py_tss_NEEDS_INIT;
     881             : }
     882             : static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
     883             :   return PyThread_set_key_value(*key, value);
     884             : }
     885             : static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
     886             :   return PyThread_get_key_value(*key);
     887             : }
     888             : #endif
     889             : #if PY_MAJOR_VERSION < 3
     890             :     #if CYTHON_COMPILING_IN_PYPY
     891             :         #if PYPY_VERSION_NUM < 0x07030600
     892             :             #if defined(__cplusplus) && __cplusplus >= 201402L
     893             :                 [[deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")]]
     894             :             #elif defined(__GNUC__) || defined(__clang__)
     895             :                 __attribute__ ((__deprecated__("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")))
     896             :             #elif defined(_MSC_VER)
     897             :                 __declspec(deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6"))
     898             :             #endif
     899             :             static CYTHON_INLINE int PyGILState_Check(void) {
     900             :                 return 0;
     901             :             }
     902             :         #else  // PYPY_VERSION_NUM < 0x07030600
     903             :         #endif  // PYPY_VERSION_NUM < 0x07030600
     904             :     #else
     905             :         static CYTHON_INLINE int PyGILState_Check(void) {
     906             :             PyThreadState * tstate = _PyThreadState_Current;
     907             :             return tstate && (tstate == PyGILState_GetThisThreadState());
     908             :         }
     909             :     #endif
     910             : #endif
     911             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyDict_NewPresized)
     912             : #define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
     913             : #else
     914             : #define __Pyx_PyDict_NewPresized(n)  PyDict_New()
     915             : #endif
     916             : #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
     917             :   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
     918             :   #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
     919             : #else
     920             :   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
     921             :   #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
     922             : #endif
     923             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && PY_VERSION_HEX < 0x030d0000 && CYTHON_USE_UNICODE_INTERNALS
     924             : #define __Pyx_PyDict_GetItemStrWithError(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
     925           0 : static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
     926           0 :     PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
     927           0 :     if (res == NULL) PyErr_Clear();
     928           0 :     return res;
     929             : }
     930             : #elif PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000)
     931             : #define __Pyx_PyDict_GetItemStrWithError  PyDict_GetItemWithError
     932             : #define __Pyx_PyDict_GetItemStr           PyDict_GetItem
     933             : #else
     934             : static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
     935             : #if CYTHON_COMPILING_IN_PYPY
     936             :     return PyDict_GetItem(dict, name);
     937             : #else
     938             :     PyDictEntry *ep;
     939             :     PyDictObject *mp = (PyDictObject*) dict;
     940             :     long hash = ((PyStringObject *) name)->ob_shash;
     941             :     assert(hash != -1);
     942             :     ep = (mp->ma_lookup)(mp, name, hash);
     943             :     if (ep == NULL) {
     944             :         return NULL;
     945             :     }
     946             :     return ep->me_value;
     947             : #endif
     948             : }
     949             : #define __Pyx_PyDict_GetItemStr           PyDict_GetItem
     950             : #endif
     951             : #if CYTHON_USE_TYPE_SLOTS
     952             :   #define __Pyx_PyType_GetFlags(tp)   (((PyTypeObject *)tp)->tp_flags)
     953             :   #define __Pyx_PyType_HasFeature(type, feature)  ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
     954             :   #define __Pyx_PyObject_GetIterNextFunc(obj)  (Py_TYPE(obj)->tp_iternext)
     955             : #else
     956             :   #define __Pyx_PyType_GetFlags(tp)   (PyType_GetFlags((PyTypeObject *)tp))
     957             :   #define __Pyx_PyType_HasFeature(type, feature)  PyType_HasFeature(type, feature)
     958             :   #define __Pyx_PyObject_GetIterNextFunc(obj)  PyIter_Next
     959             : #endif
     960             : #if CYTHON_COMPILING_IN_LIMITED_API
     961             :   #define __Pyx_SetItemOnTypeDict(tp, k, v) PyObject_GenericSetAttr((PyObject*)tp, k, v)
     962             : #else
     963             :   #define __Pyx_SetItemOnTypeDict(tp, k, v) PyDict_SetItem(tp->tp_dict, k, v)
     964             : #endif
     965             : #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000
     966             : #define __Pyx_PyHeapTypeObject_GC_Del(obj)  {\
     967             :     PyTypeObject *type = Py_TYPE((PyObject*)obj);\
     968             :     assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
     969             :     PyObject_GC_Del(obj);\
     970             :     Py_DECREF(type);\
     971             : }
     972             : #else
     973             : #define __Pyx_PyHeapTypeObject_GC_Del(obj)  PyObject_GC_Del(obj)
     974             : #endif
     975             : #if CYTHON_COMPILING_IN_LIMITED_API
     976             :   #define CYTHON_PEP393_ENABLED 1
     977             :   #define __Pyx_PyUnicode_READY(op)       (0)
     978             :   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GetLength(u)
     979             :   #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
     980             :   #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((void)u, 1114111U)
     981             :   #define __Pyx_PyUnicode_KIND(u)         ((void)u, (0))
     982             :   #define __Pyx_PyUnicode_DATA(u)         ((void*)u)
     983             :   #define __Pyx_PyUnicode_READ(k, d, i)   ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
     984             :   #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GetLength(u))
     985             : #elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
     986             :   #define CYTHON_PEP393_ENABLED 1
     987             :   #if PY_VERSION_HEX >= 0x030C0000
     988             :     #define __Pyx_PyUnicode_READY(op)       (0)
     989             :   #else
     990             :     #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
     991             :                                                 0 : _PyUnicode_Ready((PyObject *)(op)))
     992             :   #endif
     993             :   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
     994             :   #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
     995             :   #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
     996             :   #define __Pyx_PyUnicode_KIND(u)         ((int)PyUnicode_KIND(u))
     997             :   #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
     998             :   #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
     999             :   #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, (Py_UCS4) ch)
    1000             :   #if PY_VERSION_HEX >= 0x030C0000
    1001             :     #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
    1002             :   #else
    1003             :     #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
    1004             :     #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
    1005             :     #else
    1006             :     #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
    1007             :     #endif
    1008             :   #endif
    1009             : #else
    1010             :   #define CYTHON_PEP393_ENABLED 0
    1011             :   #define PyUnicode_1BYTE_KIND  1
    1012             :   #define PyUnicode_2BYTE_KIND  2
    1013             :   #define PyUnicode_4BYTE_KIND  4
    1014             :   #define __Pyx_PyUnicode_READY(op)       (0)
    1015             :   #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
    1016             :   #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
    1017             :   #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535U : 1114111U)
    1018             :   #define __Pyx_PyUnicode_KIND(u)         ((int)sizeof(Py_UNICODE))
    1019             :   #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
    1020             :   #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
    1021             :   #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = (Py_UNICODE) ch)
    1022             :   #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
    1023             : #endif
    1024             : #if CYTHON_COMPILING_IN_PYPY
    1025             :   #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
    1026             :   #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
    1027             : #else
    1028             :   #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
    1029             :   #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
    1030             :       PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
    1031             : #endif
    1032             : #if CYTHON_COMPILING_IN_PYPY
    1033             :   #if !defined(PyUnicode_DecodeUnicodeEscape)
    1034             :     #define PyUnicode_DecodeUnicodeEscape(s, size, errors)  PyUnicode_Decode(s, size, "unicode_escape", errors)
    1035             :   #endif
    1036             :   #if !defined(PyUnicode_Contains) || (PY_MAJOR_VERSION == 2 && PYPY_VERSION_NUM < 0x07030500)
    1037             :     #undef PyUnicode_Contains
    1038             :     #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
    1039             :   #endif
    1040             :   #if !defined(PyByteArray_Check)
    1041             :     #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
    1042             :   #endif
    1043             :   #if !defined(PyObject_Format)
    1044             :     #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
    1045             :   #endif
    1046             : #endif
    1047             : #define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
    1048             : #define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
    1049             : #if PY_MAJOR_VERSION >= 3
    1050             :   #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
    1051             : #else
    1052             :   #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
    1053             : #endif
    1054             : #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
    1055             :   #define PyObject_ASCII(o)            PyObject_Repr(o)
    1056             : #endif
    1057             : #if PY_MAJOR_VERSION >= 3
    1058             :   #define PyBaseString_Type            PyUnicode_Type
    1059             :   #define PyStringObject               PyUnicodeObject
    1060             :   #define PyString_Type                PyUnicode_Type
    1061             :   #define PyString_Check               PyUnicode_Check
    1062             :   #define PyString_CheckExact          PyUnicode_CheckExact
    1063             : #ifndef PyObject_Unicode
    1064             :   #define PyObject_Unicode             PyObject_Str
    1065             : #endif
    1066             : #endif
    1067             : #if PY_MAJOR_VERSION >= 3
    1068             :   #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
    1069             :   #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
    1070             : #else
    1071             :   #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
    1072             :   #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
    1073             : #endif
    1074             : #if CYTHON_COMPILING_IN_CPYTHON
    1075             :   #define __Pyx_PySequence_ListKeepNew(obj)\
    1076             :     (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
    1077             : #else
    1078             :   #define __Pyx_PySequence_ListKeepNew(obj)  PySequence_List(obj)
    1079             : #endif
    1080             : #ifndef PySet_CheckExact
    1081             :   #define PySet_CheckExact(obj)        __Pyx_IS_TYPE(obj, &PySet_Type)
    1082             : #endif
    1083             : #if PY_VERSION_HEX >= 0x030900A4
    1084             :   #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
    1085             :   #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
    1086             : #else
    1087             :   #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
    1088             :   #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
    1089             : #endif
    1090             : #if CYTHON_ASSUME_SAFE_MACROS
    1091             :   #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i)
    1092             :   #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
    1093             :   #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0))
    1094             :   #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0))
    1095             :   #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o)
    1096             :   #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o)
    1097             :   #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o)
    1098             :   #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o)
    1099             :   #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o)
    1100             : #else
    1101             :   #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i)
    1102             :   #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
    1103             :   #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v)
    1104             :   #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v)
    1105             :   #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o)
    1106             :   #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o)
    1107             :   #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o)
    1108             :   #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
    1109             :   #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
    1110             : #endif
    1111             : #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
    1112             :   #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
    1113             : #else
    1114           3 :   static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
    1115           3 :       PyObject *module = PyImport_AddModule(name);
    1116           3 :       Py_XINCREF(module);
    1117           3 :       return module;
    1118             :   }
    1119             : #endif
    1120             : #if PY_MAJOR_VERSION >= 3
    1121             :   #define PyIntObject                  PyLongObject
    1122             :   #define PyInt_Type                   PyLong_Type
    1123             :   #define PyInt_Check(op)              PyLong_Check(op)
    1124             :   #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
    1125             :   #define __Pyx_Py3Int_Check(op)       PyLong_Check(op)
    1126             :   #define __Pyx_Py3Int_CheckExact(op)  PyLong_CheckExact(op)
    1127             :   #define PyInt_FromString             PyLong_FromString
    1128             :   #define PyInt_FromUnicode            PyLong_FromUnicode
    1129             :   #define PyInt_FromLong               PyLong_FromLong
    1130             :   #define PyInt_FromSize_t             PyLong_FromSize_t
    1131             :   #define PyInt_FromSsize_t            PyLong_FromSsize_t
    1132             :   #define PyInt_AsLong                 PyLong_AsLong
    1133             :   #define PyInt_AS_LONG                PyLong_AS_LONG
    1134             :   #define PyInt_AsSsize_t              PyLong_AsSsize_t
    1135             :   #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
    1136             :   #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
    1137             :   #define PyNumber_Int                 PyNumber_Long
    1138             : #else
    1139             :   #define __Pyx_Py3Int_Check(op)       (PyLong_Check(op) || PyInt_Check(op))
    1140             :   #define __Pyx_Py3Int_CheckExact(op)  (PyLong_CheckExact(op) || PyInt_CheckExact(op))
    1141             : #endif
    1142             : #if PY_MAJOR_VERSION >= 3
    1143             :   #define PyBoolObject                 PyLongObject
    1144             : #endif
    1145             : #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
    1146             :   #ifndef PyUnicode_InternFromString
    1147             :     #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
    1148             :   #endif
    1149             : #endif
    1150             : #if PY_VERSION_HEX < 0x030200A4
    1151             :   typedef long Py_hash_t;
    1152             :   #define __Pyx_PyInt_FromHash_t PyInt_FromLong
    1153             :   #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsHash_t
    1154             : #else
    1155             :   #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
    1156             :   #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsSsize_t
    1157             : #endif
    1158             : #if CYTHON_USE_ASYNC_SLOTS
    1159             :   #if PY_VERSION_HEX >= 0x030500B1
    1160             :     #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    1161             :     #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
    1162             :   #else
    1163             :     #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
    1164             :   #endif
    1165             : #else
    1166             :   #define __Pyx_PyType_AsAsync(obj) NULL
    1167             : #endif
    1168             : #ifndef __Pyx_PyAsyncMethodsStruct
    1169             :     typedef struct {
    1170             :         unaryfunc am_await;
    1171             :         unaryfunc am_aiter;
    1172             :         unaryfunc am_anext;
    1173             :     } __Pyx_PyAsyncMethodsStruct;
    1174             : #endif
    1175             : 
    1176             : #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
    1177             :   #if !defined(_USE_MATH_DEFINES)
    1178             :     #define _USE_MATH_DEFINES
    1179             :   #endif
    1180             : #endif
    1181             : #include <math.h>
    1182             : #ifdef NAN
    1183             : #define __PYX_NAN() ((float) NAN)
    1184             : #else
    1185             : static CYTHON_INLINE float __PYX_NAN() {
    1186             :   float value;
    1187             :   memset(&value, 0xFF, sizeof(value));
    1188             :   return value;
    1189             : }
    1190             : #endif
    1191             : #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
    1192             : #define __Pyx_truncl trunc
    1193             : #else
    1194             : #define __Pyx_truncl truncl
    1195             : #endif
    1196             : 
    1197             : #define __PYX_MARK_ERR_POS(f_index, lineno) \
    1198             :     { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__;  (void)__pyx_clineno; }
    1199             : #define __PYX_ERR(f_index, lineno, Ln_error) \
    1200             :     { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
    1201             : 
    1202             : #ifdef CYTHON_EXTERN_C
    1203             :     #undef __PYX_EXTERN_C
    1204             :     #define __PYX_EXTERN_C CYTHON_EXTERN_C
    1205             : #elif defined(__PYX_EXTERN_C)
    1206             :     #ifdef _MSC_VER
    1207             :     #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
    1208             :     #else
    1209             :     #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
    1210             :     #endif
    1211             : #else
    1212             :   #ifdef __cplusplus
    1213             :     #define __PYX_EXTERN_C extern "C"
    1214             :   #else
    1215             :     #define __PYX_EXTERN_C extern
    1216             :   #endif
    1217             : #endif
    1218             : 
    1219             : #define __PYX_HAVE__scipy__linalg___decomp_lu_cython
    1220             : #define __PYX_HAVE_API__scipy__linalg___decomp_lu_cython
    1221             : /* Early includes */
    1222             : #include <string.h>
    1223             : #include <stdio.h>
    1224             : 
    1225             :     /* Using NumPy API declarations from "numpy/__init__.cython-30.pxd" */
    1226             :     
    1227             : #include "numpy/arrayobject.h"
    1228             : #include "numpy/ndarrayobject.h"
    1229             : #include "numpy/ndarraytypes.h"
    1230             : #include "numpy/arrayscalars.h"
    1231             : #include "numpy/ufuncobject.h"
    1232             : #include "pythread.h"
    1233             : #include <stdlib.h>
    1234             : #ifdef _OPENMP
    1235             : #include <omp.h>
    1236             : #endif /* _OPENMP */
    1237             : 
    1238             : #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
    1239             : #define CYTHON_WITHOUT_ASSERTIONS
    1240             : #endif
    1241             : 
    1242             : typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
    1243             :                 const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
    1244             : 
    1245             : #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
    1246             : #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
    1247             : #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
    1248             : #define __PYX_DEFAULT_STRING_ENCODING ""
    1249             : #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
    1250             : #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
    1251             : #define __Pyx_uchar_cast(c) ((unsigned char)c)
    1252             : #define __Pyx_long_cast(x) ((long)x)
    1253             : #define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    1254             :     (sizeof(type) < sizeof(Py_ssize_t))  ||\
    1255             :     (sizeof(type) > sizeof(Py_ssize_t) &&\
    1256             :           likely(v < (type)PY_SSIZE_T_MAX ||\
    1257             :                  v == (type)PY_SSIZE_T_MAX)  &&\
    1258             :           (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
    1259             :                                 v == (type)PY_SSIZE_T_MIN)))  ||\
    1260             :     (sizeof(type) == sizeof(Py_ssize_t) &&\
    1261             :           (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
    1262             :                                v == (type)PY_SSIZE_T_MAX)))  )
    1263           0 : static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    1264           0 :     return (size_t) i < (size_t) limit;
    1265             : }
    1266             : #if defined (__cplusplus) && __cplusplus >= 201103L
    1267             :     #include <cstdlib>
    1268             :     #define __Pyx_sst_abs(value) std::abs(value)
    1269             : #elif SIZEOF_INT >= SIZEOF_SIZE_T
    1270             :     #define __Pyx_sst_abs(value) abs(value)
    1271             : #elif SIZEOF_LONG >= SIZEOF_SIZE_T
    1272             :     #define __Pyx_sst_abs(value) labs(value)
    1273             : #elif defined (_MSC_VER)
    1274             :     #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
    1275             : #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    1276             :     #define __Pyx_sst_abs(value) llabs(value)
    1277             : #elif defined (__GNUC__)
    1278             :     #define __Pyx_sst_abs(value) __builtin_llabs(value)
    1279             : #else
    1280             :     #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
    1281             : #endif
    1282             : static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s);
    1283             : static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
    1284             : static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
    1285             : static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*);
    1286             : #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
    1287             : #define __Pyx_PyBytes_FromString        PyBytes_FromString
    1288             : #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
    1289             : static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
    1290             : #if PY_MAJOR_VERSION < 3
    1291             :     #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    1292             :     #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
    1293             : #else
    1294             :     #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    1295             :     #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
    1296             : #endif
    1297             : #define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
    1298             : #define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
    1299             : #define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
    1300             : #define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
    1301             : #define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
    1302             : #define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
    1303             : #define __Pyx_PyObject_AsWritableString(s)    ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
    1304             : #define __Pyx_PyObject_AsWritableSString(s)    ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
    1305             : #define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
    1306             : #define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
    1307             : #define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
    1308             : #define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
    1309             : #define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
    1310             : #define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
    1311             : #define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
    1312             : #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
    1313             : #define __Pyx_PyUnicode_FromOrdinal(o)       PyUnicode_FromOrdinal((int)o)
    1314             : #define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
    1315             : #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
    1316             : #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
    1317             : static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
    1318             : static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
    1319             : static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
    1320             : static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
    1321             : #define __Pyx_PySequence_Tuple(obj)\
    1322             :     (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
    1323             : static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
    1324             : static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
    1325             : static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
    1326             : #if CYTHON_ASSUME_SAFE_MACROS
    1327             : #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
    1328             : #else
    1329             : #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
    1330             : #endif
    1331             : #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
    1332             : #if PY_MAJOR_VERSION >= 3
    1333             : #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
    1334             : #else
    1335             : #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
    1336             : #endif
    1337             : #if CYTHON_USE_PYLONG_INTERNALS
    1338             :   #if PY_VERSION_HEX >= 0x030C00A7
    1339             :   #ifndef _PyLong_SIGN_MASK
    1340             :     #define _PyLong_SIGN_MASK 3
    1341             :   #endif
    1342             :   #ifndef _PyLong_NON_SIZE_BITS
    1343             :     #define _PyLong_NON_SIZE_BITS 3
    1344             :   #endif
    1345             :   #define __Pyx_PyLong_Sign(x)  (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK)
    1346             :   #define __Pyx_PyLong_IsNeg(x)  ((__Pyx_PyLong_Sign(x) & 2) != 0)
    1347             :   #define __Pyx_PyLong_IsNonNeg(x)  (!__Pyx_PyLong_IsNeg(x))
    1348             :   #define __Pyx_PyLong_IsZero(x)  (__Pyx_PyLong_Sign(x) & 1)
    1349             :   #define __Pyx_PyLong_IsPos(x)  (__Pyx_PyLong_Sign(x) == 0)
    1350             :   #define __Pyx_PyLong_CompactValueUnsigned(x)  (__Pyx_PyLong_Digits(x)[0])
    1351             :   #define __Pyx_PyLong_DigitCount(x)  ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS))
    1352             :   #define __Pyx_PyLong_SignedDigitCount(x)\
    1353             :         ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
    1354             :   #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
    1355             :     #define __Pyx_PyLong_IsCompact(x)     PyUnstable_Long_IsCompact((PyLongObject*) x)
    1356             :     #define __Pyx_PyLong_CompactValue(x)  PyUnstable_Long_CompactValue((PyLongObject*) x)
    1357             :   #else
    1358             :     #define __Pyx_PyLong_IsCompact(x)     (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
    1359             :     #define __Pyx_PyLong_CompactValue(x)  ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
    1360             :   #endif
    1361             :   typedef Py_ssize_t  __Pyx_compact_pylong;
    1362             :   typedef size_t  __Pyx_compact_upylong;
    1363             :   #else
    1364             :   #define __Pyx_PyLong_IsNeg(x)  (Py_SIZE(x) < 0)
    1365             :   #define __Pyx_PyLong_IsNonNeg(x)  (Py_SIZE(x) >= 0)
    1366             :   #define __Pyx_PyLong_IsZero(x)  (Py_SIZE(x) == 0)
    1367             :   #define __Pyx_PyLong_IsPos(x)  (Py_SIZE(x) > 0)
    1368             :   #define __Pyx_PyLong_CompactValueUnsigned(x)  ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0])
    1369             :   #define __Pyx_PyLong_DigitCount(x)  __Pyx_sst_abs(Py_SIZE(x))
    1370             :   #define __Pyx_PyLong_SignedDigitCount(x)  Py_SIZE(x)
    1371             :   #define __Pyx_PyLong_IsCompact(x)  (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)
    1372             :   #define __Pyx_PyLong_CompactValue(x)\
    1373             :         ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0]))
    1374             :   typedef sdigit  __Pyx_compact_pylong;
    1375             :   typedef digit  __Pyx_compact_upylong;
    1376             :   #endif
    1377             :   #if PY_VERSION_HEX >= 0x030C00A5
    1378             :   #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->long_value.ob_digit)
    1379             :   #else
    1380             :   #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->ob_digit)
    1381             :   #endif
    1382             : #endif
    1383             : #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    1384             : #include <string.h>
    1385             : static int __Pyx_sys_getdefaultencoding_not_ascii;
    1386             : static int __Pyx_init_sys_getdefaultencoding_params(void) {
    1387             :     PyObject* sys;
    1388             :     PyObject* default_encoding = NULL;
    1389             :     PyObject* ascii_chars_u = NULL;
    1390             :     PyObject* ascii_chars_b = NULL;
    1391             :     const char* default_encoding_c;
    1392             :     sys = PyImport_ImportModule("sys");
    1393             :     if (!sys) goto bad;
    1394             :     default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    1395             :     Py_DECREF(sys);
    1396             :     if (!default_encoding) goto bad;
    1397             :     default_encoding_c = PyBytes_AsString(default_encoding);
    1398             :     if (!default_encoding_c) goto bad;
    1399             :     if (strcmp(default_encoding_c, "ascii") == 0) {
    1400             :         __Pyx_sys_getdefaultencoding_not_ascii = 0;
    1401             :     } else {
    1402             :         char ascii_chars[128];
    1403             :         int c;
    1404             :         for (c = 0; c < 128; c++) {
    1405             :             ascii_chars[c] = (char) c;
    1406             :         }
    1407             :         __Pyx_sys_getdefaultencoding_not_ascii = 1;
    1408             :         ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
    1409             :         if (!ascii_chars_u) goto bad;
    1410             :         ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
    1411             :         if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
    1412             :             PyErr_Format(
    1413             :                 PyExc_ValueError,
    1414             :                 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
    1415             :                 default_encoding_c);
    1416             :             goto bad;
    1417             :         }
    1418             :         Py_DECREF(ascii_chars_u);
    1419             :         Py_DECREF(ascii_chars_b);
    1420             :     }
    1421             :     Py_DECREF(default_encoding);
    1422             :     return 0;
    1423             : bad:
    1424             :     Py_XDECREF(default_encoding);
    1425             :     Py_XDECREF(ascii_chars_u);
    1426             :     Py_XDECREF(ascii_chars_b);
    1427             :     return -1;
    1428             : }
    1429             : #endif
    1430             : #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
    1431             : #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
    1432             : #else
    1433             : #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
    1434             : #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    1435             : #include <string.h>
    1436             : static char* __PYX_DEFAULT_STRING_ENCODING;
    1437             : static int __Pyx_init_sys_getdefaultencoding_params(void) {
    1438             :     PyObject* sys;
    1439             :     PyObject* default_encoding = NULL;
    1440             :     char* default_encoding_c;
    1441             :     sys = PyImport_ImportModule("sys");
    1442             :     if (!sys) goto bad;
    1443             :     default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    1444             :     Py_DECREF(sys);
    1445             :     if (!default_encoding) goto bad;
    1446             :     default_encoding_c = PyBytes_AsString(default_encoding);
    1447             :     if (!default_encoding_c) goto bad;
    1448             :     __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
    1449             :     if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    1450             :     strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    1451             :     Py_DECREF(default_encoding);
    1452             :     return 0;
    1453             : bad:
    1454             :     Py_XDECREF(default_encoding);
    1455             :     return -1;
    1456             : }
    1457             : #endif
    1458             : #endif
    1459             : 
    1460             : 
    1461             : /* Test for GCC > 2.95 */
    1462             : #if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
    1463             :   #define likely(x)   __builtin_expect(!!(x), 1)
    1464             :   #define unlikely(x) __builtin_expect(!!(x), 0)
    1465             : #else /* !__GNUC__ or GCC < 2.95 */
    1466             :   #define likely(x)   (x)
    1467             :   #define unlikely(x) (x)
    1468             : #endif /* __GNUC__ */
    1469             : static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
    1470             : 
    1471             : #if !CYTHON_USE_MODULE_STATE
    1472             : static PyObject *__pyx_m = NULL;
    1473             : #endif
    1474             : static int __pyx_lineno;
    1475             : static int __pyx_clineno = 0;
    1476             : static const char * __pyx_cfilenm = __FILE__;
    1477             : static const char *__pyx_filename;
    1478             : 
    1479             : /* Header.proto */
    1480             : #if !defined(CYTHON_CCOMPLEX)
    1481             :   #if defined(__cplusplus)
    1482             :     #define CYTHON_CCOMPLEX 1
    1483             :   #elif (defined(_Complex_I) && !defined(_MSC_VER)) || ((defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_COMPLEX__) && !defined(_MSC_VER))
    1484             :     #define CYTHON_CCOMPLEX 1
    1485             :   #else
    1486             :     #define CYTHON_CCOMPLEX 0
    1487             :   #endif
    1488             : #endif
    1489             : #if CYTHON_CCOMPLEX
    1490             :   #ifdef __cplusplus
    1491             :     #include <complex>
    1492             :   #else
    1493             :     #include <complex.h>
    1494             :   #endif
    1495             : #endif
    1496             : #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
    1497             :   #undef _Complex_I
    1498             :   #define _Complex_I 1.0fj
    1499             : #endif
    1500             : 
    1501             : /* #### Code section: filename_table ### */
    1502             : 
    1503             : static const char *__pyx_f[] = {
    1504             :   "_decomp_lu_cython.pyx",
    1505             :   "<stringsource>",
    1506             :   "__init__.cython-30.pxd",
    1507             :   "type.pxd",
    1508             : };
    1509             : /* #### Code section: utility_code_proto_before_types ### */
    1510             : /* ForceInitThreads.proto */
    1511             : #ifndef __PYX_FORCE_INIT_THREADS
    1512             :   #define __PYX_FORCE_INIT_THREADS 0
    1513             : #endif
    1514             : 
    1515             : /* NoFastGil.proto */
    1516             : #define __Pyx_PyGILState_Ensure PyGILState_Ensure
    1517             : #define __Pyx_PyGILState_Release PyGILState_Release
    1518             : #define __Pyx_FastGIL_Remember()
    1519             : #define __Pyx_FastGIL_Forget()
    1520             : #define __Pyx_FastGilFuncInit()
    1521             : 
    1522             : /* BufferFormatStructs.proto */
    1523             : struct __Pyx_StructField_;
    1524             : #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
    1525             : typedef struct {
    1526             :   const char* name;
    1527             :   struct __Pyx_StructField_* fields;
    1528             :   size_t size;
    1529             :   size_t arraysize[8];
    1530             :   int ndim;
    1531             :   char typegroup;
    1532             :   char is_unsigned;
    1533             :   int flags;
    1534             : } __Pyx_TypeInfo;
    1535             : typedef struct __Pyx_StructField_ {
    1536             :   __Pyx_TypeInfo* type;
    1537             :   const char* name;
    1538             :   size_t offset;
    1539             : } __Pyx_StructField;
    1540             : typedef struct {
    1541             :   __Pyx_StructField* field;
    1542             :   size_t parent_offset;
    1543             : } __Pyx_BufFmt_StackElem;
    1544             : typedef struct {
    1545             :   __Pyx_StructField root;
    1546             :   __Pyx_BufFmt_StackElem* head;
    1547             :   size_t fmt_offset;
    1548             :   size_t new_count, enc_count;
    1549             :   size_t struct_alignment;
    1550             :   int is_complex;
    1551             :   char enc_type;
    1552             :   char new_packmode;
    1553             :   char enc_packmode;
    1554             :   char is_valid_array;
    1555             : } __Pyx_BufFmt_Context;
    1556             : 
    1557             : /* Atomics.proto */
    1558             : #include <pythread.h>
    1559             : #ifndef CYTHON_ATOMICS
    1560             :     #define CYTHON_ATOMICS 1
    1561             : #endif
    1562             : #define __PYX_CYTHON_ATOMICS_ENABLED() CYTHON_ATOMICS
    1563             : #define __pyx_atomic_int_type int
    1564             : #define __pyx_nonatomic_int_type int
    1565             : #if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
    1566             :                         (__STDC_VERSION__ >= 201112L) &&\
    1567             :                         !defined(__STDC_NO_ATOMICS__))
    1568             :     #include <stdatomic.h>
    1569             : #elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
    1570             :                     (__cplusplus >= 201103L) ||\
    1571             :                     (defined(_MSC_VER) && _MSC_VER >= 1700)))
    1572             :     #include <atomic>
    1573             : #endif
    1574             : #if CYTHON_ATOMICS && (defined(__STDC_VERSION__) &&\
    1575             :                         (__STDC_VERSION__ >= 201112L) &&\
    1576             :                         !defined(__STDC_NO_ATOMICS__) &&\
    1577             :                        ATOMIC_INT_LOCK_FREE == 2)
    1578             :     #undef __pyx_atomic_int_type
    1579             :     #define __pyx_atomic_int_type atomic_int
    1580             :     #define __pyx_atomic_incr_aligned(value) atomic_fetch_add_explicit(value, 1, memory_order_relaxed)
    1581             :     #define __pyx_atomic_decr_aligned(value) atomic_fetch_sub_explicit(value, 1, memory_order_acq_rel)
    1582             :     #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
    1583             :         #pragma message ("Using standard C atomics")
    1584             :     #elif defined(__PYX_DEBUG_ATOMICS)
    1585             :         #warning "Using standard C atomics"
    1586             :     #endif
    1587             : #elif CYTHON_ATOMICS && (defined(__cplusplus) && (\
    1588             :                     (__cplusplus >= 201103L) ||\
    1589             : \
    1590             :                     (defined(_MSC_VER) && _MSC_VER >= 1700)) &&\
    1591             :                     ATOMIC_INT_LOCK_FREE == 2)
    1592             :     #undef __pyx_atomic_int_type
    1593             :     #define __pyx_atomic_int_type std::atomic_int
    1594             :     #define __pyx_atomic_incr_aligned(value) std::atomic_fetch_add_explicit(value, 1, std::memory_order_relaxed)
    1595             :     #define __pyx_atomic_decr_aligned(value) std::atomic_fetch_sub_explicit(value, 1, std::memory_order_acq_rel)
    1596             :     #if defined(__PYX_DEBUG_ATOMICS) && defined(_MSC_VER)
    1597             :         #pragma message ("Using standard C++ atomics")
    1598             :     #elif defined(__PYX_DEBUG_ATOMICS)
    1599             :         #warning "Using standard C++ atomics"
    1600             :     #endif
    1601             : #elif CYTHON_ATOMICS && (__GNUC__ >= 5 || (__GNUC__ == 4 &&\
    1602             :                     (__GNUC_MINOR__ > 1 ||\
    1603             :                     (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ >= 2))))
    1604             :     #define __pyx_atomic_incr_aligned(value) __sync_fetch_and_add(value, 1)
    1605             :     #define __pyx_atomic_decr_aligned(value) __sync_fetch_and_sub(value, 1)
    1606             :     #ifdef __PYX_DEBUG_ATOMICS
    1607             :         #warning "Using GNU atomics"
    1608             :     #endif
    1609             : #elif CYTHON_ATOMICS && defined(_MSC_VER)
    1610             :     #include <intrin.h>
    1611             :     #undef __pyx_atomic_int_type
    1612             :     #define __pyx_atomic_int_type long
    1613             :     #undef __pyx_nonatomic_int_type
    1614             :     #define __pyx_nonatomic_int_type long
    1615             :     #pragma intrinsic (_InterlockedExchangeAdd)
    1616             :     #define __pyx_atomic_incr_aligned(value) _InterlockedExchangeAdd(value, 1)
    1617             :     #define __pyx_atomic_decr_aligned(value) _InterlockedExchangeAdd(value, -1)
    1618             :     #ifdef __PYX_DEBUG_ATOMICS
    1619             :         #pragma message ("Using MSVC atomics")
    1620             :     #endif
    1621             : #else
    1622             :     #undef CYTHON_ATOMICS
    1623             :     #define CYTHON_ATOMICS 0
    1624             :     #ifdef __PYX_DEBUG_ATOMICS
    1625             :         #warning "Not using atomics"
    1626             :     #endif
    1627             : #endif
    1628             : #if CYTHON_ATOMICS
    1629             :     #define __pyx_add_acquisition_count(memview)\
    1630             :              __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview))
    1631             :     #define __pyx_sub_acquisition_count(memview)\
    1632             :             __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview))
    1633             : #else
    1634             :     #define __pyx_add_acquisition_count(memview)\
    1635             :             __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
    1636             :     #define __pyx_sub_acquisition_count(memview)\
    1637             :             __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
    1638             : #endif
    1639             : 
    1640             : /* MemviewSliceStruct.proto */
    1641             : struct __pyx_memoryview_obj;
    1642             : typedef struct {
    1643             :   struct __pyx_memoryview_obj *memview;
    1644             :   char *data;
    1645             :   Py_ssize_t shape[8];
    1646             :   Py_ssize_t strides[8];
    1647             :   Py_ssize_t suboffsets[8];
    1648             : } __Pyx_memviewslice;
    1649             : #define __Pyx_MemoryView_Len(m)  (m.shape[0])
    1650             : 
    1651             : /* #### Code section: numeric_typedefs ### */
    1652             : 
    1653             : /* "scipy/linalg/cython_lapack.pxd":17
    1654             :  * # The original libraries should be linked directly.
    1655             :  * 
    1656             :  * ctypedef float s             # <<<<<<<<<<<<<<
    1657             :  * ctypedef double d
    1658             :  * ctypedef float complex c
    1659             :  */
    1660             : typedef float __pyx_t_5scipy_6linalg_13cython_lapack_s;
    1661             : 
    1662             : /* "scipy/linalg/cython_lapack.pxd":18
    1663             :  * 
    1664             :  * ctypedef float s
    1665             :  * ctypedef double d             # <<<<<<<<<<<<<<
    1666             :  * ctypedef float complex c
    1667             :  * ctypedef double complex z
    1668             :  */
    1669             : typedef double __pyx_t_5scipy_6linalg_13cython_lapack_d;
    1670             : 
    1671             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":769
    1672             :  * # in Cython to enable them only on the right systems.
    1673             :  * 
    1674             :  * ctypedef npy_int8       int8_t             # <<<<<<<<<<<<<<
    1675             :  * ctypedef npy_int16      int16_t
    1676             :  * ctypedef npy_int32      int32_t
    1677             :  */
    1678             : typedef npy_int8 __pyx_t_5numpy_int8_t;
    1679             : 
    1680             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":770
    1681             :  * 
    1682             :  * ctypedef npy_int8       int8_t
    1683             :  * ctypedef npy_int16      int16_t             # <<<<<<<<<<<<<<
    1684             :  * ctypedef npy_int32      int32_t
    1685             :  * ctypedef npy_int64      int64_t
    1686             :  */
    1687             : typedef npy_int16 __pyx_t_5numpy_int16_t;
    1688             : 
    1689             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":771
    1690             :  * ctypedef npy_int8       int8_t
    1691             :  * ctypedef npy_int16      int16_t
    1692             :  * ctypedef npy_int32      int32_t             # <<<<<<<<<<<<<<
    1693             :  * ctypedef npy_int64      int64_t
    1694             :  * #ctypedef npy_int96      int96_t
    1695             :  */
    1696             : typedef npy_int32 __pyx_t_5numpy_int32_t;
    1697             : 
    1698             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":772
    1699             :  * ctypedef npy_int16      int16_t
    1700             :  * ctypedef npy_int32      int32_t
    1701             :  * ctypedef npy_int64      int64_t             # <<<<<<<<<<<<<<
    1702             :  * #ctypedef npy_int96      int96_t
    1703             :  * #ctypedef npy_int128     int128_t
    1704             :  */
    1705             : typedef npy_int64 __pyx_t_5numpy_int64_t;
    1706             : 
    1707             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":776
    1708             :  * #ctypedef npy_int128     int128_t
    1709             :  * 
    1710             :  * ctypedef npy_uint8      uint8_t             # <<<<<<<<<<<<<<
    1711             :  * ctypedef npy_uint16     uint16_t
    1712             :  * ctypedef npy_uint32     uint32_t
    1713             :  */
    1714             : typedef npy_uint8 __pyx_t_5numpy_uint8_t;
    1715             : 
    1716             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":777
    1717             :  * 
    1718             :  * ctypedef npy_uint8      uint8_t
    1719             :  * ctypedef npy_uint16     uint16_t             # <<<<<<<<<<<<<<
    1720             :  * ctypedef npy_uint32     uint32_t
    1721             :  * ctypedef npy_uint64     uint64_t
    1722             :  */
    1723             : typedef npy_uint16 __pyx_t_5numpy_uint16_t;
    1724             : 
    1725             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":778
    1726             :  * ctypedef npy_uint8      uint8_t
    1727             :  * ctypedef npy_uint16     uint16_t
    1728             :  * ctypedef npy_uint32     uint32_t             # <<<<<<<<<<<<<<
    1729             :  * ctypedef npy_uint64     uint64_t
    1730             :  * #ctypedef npy_uint96     uint96_t
    1731             :  */
    1732             : typedef npy_uint32 __pyx_t_5numpy_uint32_t;
    1733             : 
    1734             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":779
    1735             :  * ctypedef npy_uint16     uint16_t
    1736             :  * ctypedef npy_uint32     uint32_t
    1737             :  * ctypedef npy_uint64     uint64_t             # <<<<<<<<<<<<<<
    1738             :  * #ctypedef npy_uint96     uint96_t
    1739             :  * #ctypedef npy_uint128    uint128_t
    1740             :  */
    1741             : typedef npy_uint64 __pyx_t_5numpy_uint64_t;
    1742             : 
    1743             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":783
    1744             :  * #ctypedef npy_uint128    uint128_t
    1745             :  * 
    1746             :  * ctypedef npy_float32    float32_t             # <<<<<<<<<<<<<<
    1747             :  * ctypedef npy_float64    float64_t
    1748             :  * #ctypedef npy_float80    float80_t
    1749             :  */
    1750             : typedef npy_float32 __pyx_t_5numpy_float32_t;
    1751             : 
    1752             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":784
    1753             :  * 
    1754             :  * ctypedef npy_float32    float32_t
    1755             :  * ctypedef npy_float64    float64_t             # <<<<<<<<<<<<<<
    1756             :  * #ctypedef npy_float80    float80_t
    1757             :  * #ctypedef npy_float128   float128_t
    1758             :  */
    1759             : typedef npy_float64 __pyx_t_5numpy_float64_t;
    1760             : 
    1761             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":791
    1762             :  * ctypedef double complex complex128_t
    1763             :  * 
    1764             :  * ctypedef npy_longlong   longlong_t             # <<<<<<<<<<<<<<
    1765             :  * ctypedef npy_ulonglong  ulonglong_t
    1766             :  * 
    1767             :  */
    1768             : typedef npy_longlong __pyx_t_5numpy_longlong_t;
    1769             : 
    1770             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":792
    1771             :  * 
    1772             :  * ctypedef npy_longlong   longlong_t
    1773             :  * ctypedef npy_ulonglong  ulonglong_t             # <<<<<<<<<<<<<<
    1774             :  * 
    1775             :  * ctypedef npy_intp       intp_t
    1776             :  */
    1777             : typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
    1778             : 
    1779             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":794
    1780             :  * ctypedef npy_ulonglong  ulonglong_t
    1781             :  * 
    1782             :  * ctypedef npy_intp       intp_t             # <<<<<<<<<<<<<<
    1783             :  * ctypedef npy_uintp      uintp_t
    1784             :  * 
    1785             :  */
    1786             : typedef npy_intp __pyx_t_5numpy_intp_t;
    1787             : 
    1788             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":795
    1789             :  * 
    1790             :  * ctypedef npy_intp       intp_t
    1791             :  * ctypedef npy_uintp      uintp_t             # <<<<<<<<<<<<<<
    1792             :  * 
    1793             :  * ctypedef npy_double     float_t
    1794             :  */
    1795             : typedef npy_uintp __pyx_t_5numpy_uintp_t;
    1796             : 
    1797             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":797
    1798             :  * ctypedef npy_uintp      uintp_t
    1799             :  * 
    1800             :  * ctypedef npy_double     float_t             # <<<<<<<<<<<<<<
    1801             :  * ctypedef npy_double     double_t
    1802             :  * ctypedef npy_longdouble longdouble_t
    1803             :  */
    1804             : typedef npy_double __pyx_t_5numpy_float_t;
    1805             : 
    1806             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":798
    1807             :  * 
    1808             :  * ctypedef npy_double     float_t
    1809             :  * ctypedef npy_double     double_t             # <<<<<<<<<<<<<<
    1810             :  * ctypedef npy_longdouble longdouble_t
    1811             :  * 
    1812             :  */
    1813             : typedef npy_double __pyx_t_5numpy_double_t;
    1814             : 
    1815             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":799
    1816             :  * ctypedef npy_double     float_t
    1817             :  * ctypedef npy_double     double_t
    1818             :  * ctypedef npy_longdouble longdouble_t             # <<<<<<<<<<<<<<
    1819             :  * 
    1820             :  * ctypedef float complex       cfloat_t
    1821             :  */
    1822             : typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
    1823             : /* #### Code section: complex_type_declarations ### */
    1824             : /* Declarations.proto */
    1825             : #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
    1826             :   #ifdef __cplusplus
    1827             :     typedef ::std::complex< float > __pyx_t_float_complex;
    1828             :   #else
    1829             :     typedef float _Complex __pyx_t_float_complex;
    1830             :   #endif
    1831             : #else
    1832             :     typedef struct { float real, imag; } __pyx_t_float_complex;
    1833             : #endif
    1834             : static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
    1835             : 
    1836             : /* Declarations.proto */
    1837             : #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
    1838             :   #ifdef __cplusplus
    1839             :     typedef ::std::complex< double > __pyx_t_double_complex;
    1840             :   #else
    1841             :     typedef double _Complex __pyx_t_double_complex;
    1842             :   #endif
    1843             : #else
    1844             :     typedef struct { double real, imag; } __pyx_t_double_complex;
    1845             : #endif
    1846             : static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
    1847             : 
    1848             : /* Declarations.proto */
    1849             : #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
    1850             :   #ifdef __cplusplus
    1851             :     typedef ::std::complex< long double > __pyx_t_long_double_complex;
    1852             :   #else
    1853             :     typedef long double _Complex __pyx_t_long_double_complex;
    1854             :   #endif
    1855             : #else
    1856             :     typedef struct { long double real, imag; } __pyx_t_long_double_complex;
    1857             : #endif
    1858             : static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double, long double);
    1859             : 
    1860             : /* #### Code section: type_declarations ### */
    1861             : 
    1862             : /*--- Type declarations ---*/
    1863             : struct __pyx_array_obj;
    1864             : struct __pyx_MemviewEnum_obj;
    1865             : struct __pyx_memoryview_obj;
    1866             : struct __pyx_memoryviewslice_obj;
    1867             : 
    1868             : /* "scipy/linalg/cython_lapack.pxd":24
    1869             :  * # Function pointer type declarations for
    1870             :  * # gees and gges families of functions.
    1871             :  * ctypedef bint cselect1(c*)             # <<<<<<<<<<<<<<
    1872             :  * ctypedef bint cselect2(c*, c*)
    1873             :  * ctypedef bint dselect2(d*, d*)
    1874             :  */
    1875             : typedef int __pyx_t_5scipy_6linalg_13cython_lapack_cselect1(__pyx_t_float_complex *);
    1876             : 
    1877             : /* "scipy/linalg/cython_lapack.pxd":25
    1878             :  * # gees and gges families of functions.
    1879             :  * ctypedef bint cselect1(c*)
    1880             :  * ctypedef bint cselect2(c*, c*)             # <<<<<<<<<<<<<<
    1881             :  * ctypedef bint dselect2(d*, d*)
    1882             :  * ctypedef bint dselect3(d*, d*, d*)
    1883             :  */
    1884             : typedef int __pyx_t_5scipy_6linalg_13cython_lapack_cselect2(__pyx_t_float_complex *, __pyx_t_float_complex *);
    1885             : 
    1886             : /* "scipy/linalg/cython_lapack.pxd":26
    1887             :  * ctypedef bint cselect1(c*)
    1888             :  * ctypedef bint cselect2(c*, c*)
    1889             :  * ctypedef bint dselect2(d*, d*)             # <<<<<<<<<<<<<<
    1890             :  * ctypedef bint dselect3(d*, d*, d*)
    1891             :  * ctypedef bint sselect2(s*, s*)
    1892             :  */
    1893             : typedef int __pyx_t_5scipy_6linalg_13cython_lapack_dselect2(__pyx_t_5scipy_6linalg_13cython_lapack_d *, __pyx_t_5scipy_6linalg_13cython_lapack_d *);
    1894             : 
    1895             : /* "scipy/linalg/cython_lapack.pxd":27
    1896             :  * ctypedef bint cselect2(c*, c*)
    1897             :  * ctypedef bint dselect2(d*, d*)
    1898             :  * ctypedef bint dselect3(d*, d*, d*)             # <<<<<<<<<<<<<<
    1899             :  * ctypedef bint sselect2(s*, s*)
    1900             :  * ctypedef bint sselect3(s*, s*, s*)
    1901             :  */
    1902             : typedef int __pyx_t_5scipy_6linalg_13cython_lapack_dselect3(__pyx_t_5scipy_6linalg_13cython_lapack_d *, __pyx_t_5scipy_6linalg_13cython_lapack_d *, __pyx_t_5scipy_6linalg_13cython_lapack_d *);
    1903             : 
    1904             : /* "scipy/linalg/cython_lapack.pxd":28
    1905             :  * ctypedef bint dselect2(d*, d*)
    1906             :  * ctypedef bint dselect3(d*, d*, d*)
    1907             :  * ctypedef bint sselect2(s*, s*)             # <<<<<<<<<<<<<<
    1908             :  * ctypedef bint sselect3(s*, s*, s*)
    1909             :  * ctypedef bint zselect1(z*)
    1910             :  */
    1911             : typedef int __pyx_t_5scipy_6linalg_13cython_lapack_sselect2(__pyx_t_5scipy_6linalg_13cython_lapack_s *, __pyx_t_5scipy_6linalg_13cython_lapack_s *);
    1912             : 
    1913             : /* "scipy/linalg/cython_lapack.pxd":29
    1914             :  * ctypedef bint dselect3(d*, d*, d*)
    1915             :  * ctypedef bint sselect2(s*, s*)
    1916             :  * ctypedef bint sselect3(s*, s*, s*)             # <<<<<<<<<<<<<<
    1917             :  * ctypedef bint zselect1(z*)
    1918             :  * ctypedef bint zselect2(z*, z*)
    1919             :  */
    1920             : typedef int __pyx_t_5scipy_6linalg_13cython_lapack_sselect3(__pyx_t_5scipy_6linalg_13cython_lapack_s *, __pyx_t_5scipy_6linalg_13cython_lapack_s *, __pyx_t_5scipy_6linalg_13cython_lapack_s *);
    1921             : 
    1922             : /* "scipy/linalg/cython_lapack.pxd":30
    1923             :  * ctypedef bint sselect2(s*, s*)
    1924             :  * ctypedef bint sselect3(s*, s*, s*)
    1925             :  * ctypedef bint zselect1(z*)             # <<<<<<<<<<<<<<
    1926             :  * ctypedef bint zselect2(z*, z*)
    1927             :  * 
    1928             :  */
    1929             : typedef int __pyx_t_5scipy_6linalg_13cython_lapack_zselect1(__pyx_t_double_complex *);
    1930             : 
    1931             : /* "scipy/linalg/cython_lapack.pxd":31
    1932             :  * ctypedef bint sselect3(s*, s*, s*)
    1933             :  * ctypedef bint zselect1(z*)
    1934             :  * ctypedef bint zselect2(z*, z*)             # <<<<<<<<<<<<<<
    1935             :  * 
    1936             :  * cdef void cbbcsd(char *jobu1, char *jobu2, char *jobv1t, char *jobv2t, char *trans, int *m, int *p, int *q, s *theta, s *phi, c *u1, int *ldu1, c *u2, int *ldu2, c *v1t, int *ldv1t, c *v2t, int *ldv2t, s *b11d, s *b11e, s *b12d, s *b12e, s *b21d, s *b21e, s *b22d, s *b22e, s *rwork, int *lrwork, int *info) noexcept nogil
    1937             :  */
    1938             : typedef int __pyx_t_5scipy_6linalg_13cython_lapack_zselect2(__pyx_t_double_complex *, __pyx_t_double_complex *);
    1939             : 
    1940             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1095
    1941             :  * 
    1942             :  * # Iterator API added in v1.6
    1943             :  * ctypedef int (*NpyIter_IterNextFunc)(NpyIter* it) noexcept nogil             # <<<<<<<<<<<<<<
    1944             :  * ctypedef void (*NpyIter_GetMultiIndexFunc)(NpyIter* it, npy_intp* outcoords) noexcept nogil
    1945             :  * 
    1946             :  */
    1947             : typedef int (*__pyx_t_5numpy_NpyIter_IterNextFunc)(NpyIter *);
    1948             : 
    1949             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1096
    1950             :  * # Iterator API added in v1.6
    1951             :  * ctypedef int (*NpyIter_IterNextFunc)(NpyIter* it) noexcept nogil
    1952             :  * ctypedef void (*NpyIter_GetMultiIndexFunc)(NpyIter* it, npy_intp* outcoords) noexcept nogil             # <<<<<<<<<<<<<<
    1953             :  * 
    1954             :  * cdef extern from "numpy/arrayobject.h":
    1955             :  */
    1956             : typedef void (*__pyx_t_5numpy_NpyIter_GetMultiIndexFunc)(NpyIter *, npy_intp *);
    1957             : struct __pyx_ctuple_int__and_int;
    1958             : typedef struct __pyx_ctuple_int__and_int __pyx_ctuple_int__and_int;
    1959             : 
    1960             : /* "scipy/linalg/_cythonized_array_utils.pxd":38
    1961             :  * 
    1962             :  * cdef void swap_c_and_f_layout(lapack_t *a, lapack_t *b, int r, int c) noexcept nogil
    1963             :  * cdef (int, int) band_check_internal_c(np_numeric_t[:, ::1]A) noexcept nogil             # <<<<<<<<<<<<<<
    1964             :  * cdef bint is_sym_her_real_c_internal(np_numeric_t[:, ::1]A) noexcept nogil
    1965             :  * cdef bint is_sym_her_complex_c_internal(np_complex_numeric_t[:, ::1]A) noexcept nogil
    1966             :  */
    1967             : struct __pyx_ctuple_int__and_int {
    1968             :   int f0;
    1969             :   int f1;
    1970             : };
    1971             : 
    1972             : /* "View.MemoryView":114
    1973             :  * @cython.collection_type("sequence")
    1974             :  * @cname("__pyx_array")
    1975             :  * cdef class array:             # <<<<<<<<<<<<<<
    1976             :  * 
    1977             :  *     cdef:
    1978             :  */
    1979             : struct __pyx_array_obj {
    1980             :   PyObject_HEAD
    1981             :   struct __pyx_vtabstruct_array *__pyx_vtab;
    1982             :   char *data;
    1983             :   Py_ssize_t len;
    1984             :   char *format;
    1985             :   int ndim;
    1986             :   Py_ssize_t *_shape;
    1987             :   Py_ssize_t *_strides;
    1988             :   Py_ssize_t itemsize;
    1989             :   PyObject *mode;
    1990             :   PyObject *_format;
    1991             :   void (*callback_free_data)(void *);
    1992             :   int free_data;
    1993             :   int dtype_is_object;
    1994             : };
    1995             : 
    1996             : 
    1997             : /* "View.MemoryView":302
    1998             :  * 
    1999             :  * @cname('__pyx_MemviewEnum')
    2000             :  * cdef class Enum(object):             # <<<<<<<<<<<<<<
    2001             :  *     cdef object name
    2002             :  *     def __init__(self, name):
    2003             :  */
    2004             : struct __pyx_MemviewEnum_obj {
    2005             :   PyObject_HEAD
    2006             :   PyObject *name;
    2007             : };
    2008             : 
    2009             : 
    2010             : /* "View.MemoryView":337
    2011             :  * 
    2012             :  * @cname('__pyx_memoryview')
    2013             :  * cdef class memoryview:             # <<<<<<<<<<<<<<
    2014             :  * 
    2015             :  *     cdef object obj
    2016             :  */
    2017             : struct __pyx_memoryview_obj {
    2018             :   PyObject_HEAD
    2019             :   struct __pyx_vtabstruct_memoryview *__pyx_vtab;
    2020             :   PyObject *obj;
    2021             :   PyObject *_size;
    2022             :   PyObject *_array_interface;
    2023             :   PyThread_type_lock lock;
    2024             :   __pyx_atomic_int_type acquisition_count;
    2025             :   Py_buffer view;
    2026             :   int flags;
    2027             :   int dtype_is_object;
    2028             :   __Pyx_TypeInfo *typeinfo;
    2029             : };
    2030             : 
    2031             : 
    2032             : /* "View.MemoryView":952
    2033             :  * @cython.collection_type("sequence")
    2034             :  * @cname('__pyx_memoryviewslice')
    2035             :  * cdef class _memoryviewslice(memoryview):             # <<<<<<<<<<<<<<
    2036             :  *     "Internal class for passing memoryview slices to Python"
    2037             :  * 
    2038             :  */
    2039             : struct __pyx_memoryviewslice_obj {
    2040             :   struct __pyx_memoryview_obj __pyx_base;
    2041             :   __Pyx_memviewslice from_slice;
    2042             :   PyObject *from_object;
    2043             :   PyObject *(*to_object_func)(char *);
    2044             :   int (*to_dtype_func)(char *, PyObject *);
    2045             : };
    2046             : 
    2047             : 
    2048             : 
    2049             : /* "View.MemoryView":114
    2050             :  * @cython.collection_type("sequence")
    2051             :  * @cname("__pyx_array")
    2052             :  * cdef class array:             # <<<<<<<<<<<<<<
    2053             :  * 
    2054             :  *     cdef:
    2055             :  */
    2056             : 
    2057             : struct __pyx_vtabstruct_array {
    2058             :   PyObject *(*get_memview)(struct __pyx_array_obj *);
    2059             : };
    2060             : static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;
    2061             : 
    2062             : 
    2063             : /* "View.MemoryView":337
    2064             :  * 
    2065             :  * @cname('__pyx_memoryview')
    2066             :  * cdef class memoryview:             # <<<<<<<<<<<<<<
    2067             :  * 
    2068             :  *     cdef object obj
    2069             :  */
    2070             : 
    2071             : struct __pyx_vtabstruct_memoryview {
    2072             :   char *(*get_item_pointer)(struct __pyx_memoryview_obj *, PyObject *);
    2073             :   PyObject *(*is_slice)(struct __pyx_memoryview_obj *, PyObject *);
    2074             :   PyObject *(*setitem_slice_assignment)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
    2075             :   PyObject *(*setitem_slice_assign_scalar)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *);
    2076             :   PyObject *(*setitem_indexed)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
    2077             :   PyObject *(*convert_item_to_object)(struct __pyx_memoryview_obj *, char *);
    2078             :   PyObject *(*assign_item_from_object)(struct __pyx_memoryview_obj *, char *, PyObject *);
    2079             :   PyObject *(*_get_base)(struct __pyx_memoryview_obj *);
    2080             : };
    2081             : static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;
    2082             : 
    2083             : 
    2084             : /* "View.MemoryView":952
    2085             :  * @cython.collection_type("sequence")
    2086             :  * @cname('__pyx_memoryviewslice')
    2087             :  * cdef class _memoryviewslice(memoryview):             # <<<<<<<<<<<<<<
    2088             :  *     "Internal class for passing memoryview slices to Python"
    2089             :  * 
    2090             :  */
    2091             : 
    2092             : struct __pyx_vtabstruct__memoryviewslice {
    2093             :   struct __pyx_vtabstruct_memoryview __pyx_base;
    2094             : };
    2095             : static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
    2096             : /* #### Code section: utility_code_proto ### */
    2097             : 
    2098             : /* --- Runtime support code (head) --- */
    2099             : /* Refnanny.proto */
    2100             : #ifndef CYTHON_REFNANNY
    2101             :   #define CYTHON_REFNANNY 0
    2102             : #endif
    2103             : #if CYTHON_REFNANNY
    2104             :   typedef struct {
    2105             :     void (*INCREF)(void*, PyObject*, Py_ssize_t);
    2106             :     void (*DECREF)(void*, PyObject*, Py_ssize_t);
    2107             :     void (*GOTREF)(void*, PyObject*, Py_ssize_t);
    2108             :     void (*GIVEREF)(void*, PyObject*, Py_ssize_t);
    2109             :     void* (*SetupContext)(const char*, Py_ssize_t, const char*);
    2110             :     void (*FinishContext)(void**);
    2111             :   } __Pyx_RefNannyAPIStruct;
    2112             :   static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
    2113             :   static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
    2114             :   #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
    2115             : #ifdef WITH_THREAD
    2116             :   #define __Pyx_RefNannySetupContext(name, acquire_gil)\
    2117             :           if (acquire_gil) {\
    2118             :               PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
    2119             :               __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
    2120             :               PyGILState_Release(__pyx_gilstate_save);\
    2121             :           } else {\
    2122             :               __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
    2123             :           }
    2124             :   #define __Pyx_RefNannyFinishContextNogil() {\
    2125             :               PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
    2126             :               __Pyx_RefNannyFinishContext();\
    2127             :               PyGILState_Release(__pyx_gilstate_save);\
    2128             :           }
    2129             : #else
    2130             :   #define __Pyx_RefNannySetupContext(name, acquire_gil)\
    2131             :           __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__))
    2132             :   #define __Pyx_RefNannyFinishContextNogil() __Pyx_RefNannyFinishContext()
    2133             : #endif
    2134             :   #define __Pyx_RefNannyFinishContextNogil() {\
    2135             :               PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
    2136             :               __Pyx_RefNannyFinishContext();\
    2137             :               PyGILState_Release(__pyx_gilstate_save);\
    2138             :           }
    2139             :   #define __Pyx_RefNannyFinishContext()\
    2140             :           __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
    2141             :   #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
    2142             :   #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
    2143             :   #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
    2144             :   #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
    2145             :   #define __Pyx_XINCREF(r)  do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0)
    2146             :   #define __Pyx_XDECREF(r)  do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0)
    2147             :   #define __Pyx_XGOTREF(r)  do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0)
    2148             :   #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0)
    2149             : #else
    2150             :   #define __Pyx_RefNannyDeclarations
    2151             :   #define __Pyx_RefNannySetupContext(name, acquire_gil)
    2152             :   #define __Pyx_RefNannyFinishContextNogil()
    2153             :   #define __Pyx_RefNannyFinishContext()
    2154             :   #define __Pyx_INCREF(r) Py_INCREF(r)
    2155             :   #define __Pyx_DECREF(r) Py_DECREF(r)
    2156             :   #define __Pyx_GOTREF(r)
    2157             :   #define __Pyx_GIVEREF(r)
    2158             :   #define __Pyx_XINCREF(r) Py_XINCREF(r)
    2159             :   #define __Pyx_XDECREF(r) Py_XDECREF(r)
    2160             :   #define __Pyx_XGOTREF(r)
    2161             :   #define __Pyx_XGIVEREF(r)
    2162             : #endif
    2163             : #define __Pyx_Py_XDECREF_SET(r, v) do {\
    2164             :         PyObject *tmp = (PyObject *) r;\
    2165             :         r = v; Py_XDECREF(tmp);\
    2166             :     } while (0)
    2167             : #define __Pyx_XDECREF_SET(r, v) do {\
    2168             :         PyObject *tmp = (PyObject *) r;\
    2169             :         r = v; __Pyx_XDECREF(tmp);\
    2170             :     } while (0)
    2171             : #define __Pyx_DECREF_SET(r, v) do {\
    2172             :         PyObject *tmp = (PyObject *) r;\
    2173             :         r = v; __Pyx_DECREF(tmp);\
    2174             :     } while (0)
    2175             : #define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
    2176             : #define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
    2177             : 
    2178             : /* PyErrExceptionMatches.proto */
    2179             : #if CYTHON_FAST_THREAD_STATE
    2180             : #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
    2181             : static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
    2182             : #else
    2183             : #define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
    2184             : #endif
    2185             : 
    2186             : /* PyThreadStateGet.proto */
    2187             : #if CYTHON_FAST_THREAD_STATE
    2188             : #define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
    2189             : #define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
    2190             : #if PY_VERSION_HEX >= 0x030C00A6
    2191             : #define __Pyx_PyErr_Occurred()  (__pyx_tstate->current_exception != NULL)
    2192             : #define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL)
    2193             : #else
    2194             : #define __Pyx_PyErr_Occurred()  (__pyx_tstate->curexc_type != NULL)
    2195             : #define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->curexc_type)
    2196             : #endif
    2197             : #else
    2198             : #define __Pyx_PyThreadState_declare
    2199             : #define __Pyx_PyThreadState_assign
    2200             : #define __Pyx_PyErr_Occurred()  (PyErr_Occurred() != NULL)
    2201             : #define __Pyx_PyErr_CurrentExceptionType()  PyErr_Occurred()
    2202             : #endif
    2203             : 
    2204             : /* PyErrFetchRestore.proto */
    2205             : #if CYTHON_FAST_THREAD_STATE
    2206             : #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
    2207             : #define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
    2208             : #define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
    2209             : #define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
    2210             : #define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
    2211             : static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
    2212             : static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
    2213             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6
    2214             : #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
    2215             : #else
    2216             : #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
    2217             : #endif
    2218             : #else
    2219             : #define __Pyx_PyErr_Clear() PyErr_Clear()
    2220             : #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
    2221             : #define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
    2222             : #define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
    2223             : #define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
    2224             : #define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
    2225             : #define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
    2226             : #define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
    2227             : #endif
    2228             : 
    2229             : /* PyObjectGetAttrStr.proto */
    2230             : #if CYTHON_USE_TYPE_SLOTS
    2231             : static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
    2232             : #else
    2233             : #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
    2234             : #endif
    2235             : 
    2236             : /* PyObjectGetAttrStrNoError.proto */
    2237             : static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
    2238             : 
    2239             : /* GetBuiltinName.proto */
    2240             : static PyObject *__Pyx_GetBuiltinName(PyObject *name);
    2241             : 
    2242             : /* TupleAndListFromArray.proto */
    2243             : #if CYTHON_COMPILING_IN_CPYTHON
    2244             : static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
    2245             : static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n);
    2246             : #endif
    2247             : 
    2248             : /* IncludeStringH.proto */
    2249             : #include <string.h>
    2250             : 
    2251             : /* BytesEquals.proto */
    2252             : static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
    2253             : 
    2254             : /* UnicodeEquals.proto */
    2255             : static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
    2256             : 
    2257             : /* fastcall.proto */
    2258             : #if CYTHON_AVOID_BORROWED_REFS
    2259             :     #define __Pyx_Arg_VARARGS(args, i) PySequence_GetItem(args, i)
    2260             : #elif CYTHON_ASSUME_SAFE_MACROS
    2261             :     #define __Pyx_Arg_VARARGS(args, i) PyTuple_GET_ITEM(args, i)
    2262             : #else
    2263             :     #define __Pyx_Arg_VARARGS(args, i) PyTuple_GetItem(args, i)
    2264             : #endif
    2265             : #if CYTHON_AVOID_BORROWED_REFS
    2266             :     #define __Pyx_Arg_NewRef_VARARGS(arg) __Pyx_NewRef(arg)
    2267             :     #define __Pyx_Arg_XDECREF_VARARGS(arg) Py_XDECREF(arg)
    2268             : #else
    2269             :     #define __Pyx_Arg_NewRef_VARARGS(arg) arg
    2270             :     #define __Pyx_Arg_XDECREF_VARARGS(arg)
    2271             : #endif
    2272             : #define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
    2273             : #define __Pyx_KwValues_VARARGS(args, nargs) NULL
    2274             : #define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
    2275             : #define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
    2276             : #if CYTHON_METH_FASTCALL
    2277             :     #define __Pyx_Arg_FASTCALL(args, i) args[i]
    2278             :     #define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds)
    2279             :     #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs))
    2280             :     static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s);
    2281             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
    2282             :     CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues);
    2283             :   #else
    2284             :     #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
    2285             :   #endif
    2286             :     #define __Pyx_Arg_NewRef_FASTCALL(arg) arg  /* no-op, __Pyx_Arg_FASTCALL is direct and this needs
    2287             :                                                    to have the same reference counting */
    2288             :     #define __Pyx_Arg_XDECREF_FASTCALL(arg)
    2289             : #else
    2290             :     #define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS
    2291             :     #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
    2292             :     #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
    2293             :     #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
    2294             :     #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
    2295             :     #define __Pyx_Arg_NewRef_FASTCALL(arg) __Pyx_Arg_NewRef_VARARGS(arg)
    2296             :     #define __Pyx_Arg_XDECREF_FASTCALL(arg) __Pyx_Arg_XDECREF_VARARGS(arg)
    2297             : #endif
    2298             : #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    2299             : #define __Pyx_ArgsSlice_VARARGS(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_VARARGS(args, start), stop - start)
    2300             : #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_FASTCALL(args, start), stop - start)
    2301             : #else
    2302             : #define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
    2303             : #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop)
    2304             : #endif
    2305             : 
    2306             : /* RaiseArgTupleInvalid.proto */
    2307             : static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    2308             :     Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
    2309             : 
    2310             : /* RaiseDoubleKeywords.proto */
    2311             : static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
    2312             : 
    2313             : /* ParseKeywords.proto */
    2314             : static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject *const *kwvalues,
    2315             :     PyObject **argnames[],
    2316             :     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,
    2317             :     const char* function_name);
    2318             : 
    2319             : /* ArgTypeTest.proto */
    2320             : #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
    2321             :     ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\
    2322             :         __Pyx__ArgTypeTest(obj, type, name, exact))
    2323             : static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
    2324             : 
    2325             : /* RaiseException.proto */
    2326             : static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
    2327             : 
    2328             : /* PyFunctionFastCall.proto */
    2329             : #if CYTHON_FAST_PYCALL
    2330             : #if !CYTHON_VECTORCALL
    2331             : #define __Pyx_PyFunction_FastCall(func, args, nargs)\
    2332             :     __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
    2333             : static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
    2334             : #endif
    2335             : #define __Pyx_BUILD_ASSERT_EXPR(cond)\
    2336             :     (sizeof(char [1 - 2*!(cond)]) - 1)
    2337             : #ifndef Py_MEMBER_SIZE
    2338             : #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
    2339             : #endif
    2340             : #if !CYTHON_VECTORCALL
    2341             : #if PY_VERSION_HEX >= 0x03080000
    2342             :   #include "frameobject.h"
    2343             : #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API
    2344             :   #ifndef Py_BUILD_CORE
    2345             :     #define Py_BUILD_CORE 1
    2346             :   #endif
    2347             :   #include "internal/pycore_frame.h"
    2348             : #endif
    2349             :   #define __Pxy_PyFrame_Initialize_Offsets()
    2350             :   #define __Pyx_PyFrame_GetLocalsplus(frame)  ((frame)->f_localsplus)
    2351             : #else
    2352             :   static size_t __pyx_pyframe_localsplus_offset = 0;
    2353             :   #include "frameobject.h"
    2354             :   #define __Pxy_PyFrame_Initialize_Offsets()\
    2355             :     ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
    2356             :      (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
    2357             :   #define __Pyx_PyFrame_GetLocalsplus(frame)\
    2358             :     (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
    2359             : #endif
    2360             : #endif
    2361             : #endif
    2362             : 
    2363             : /* PyObjectCall.proto */
    2364             : #if CYTHON_COMPILING_IN_CPYTHON
    2365             : static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
    2366             : #else
    2367             : #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
    2368             : #endif
    2369             : 
    2370             : /* PyObjectCallMethO.proto */
    2371             : #if CYTHON_COMPILING_IN_CPYTHON
    2372             : static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
    2373             : #endif
    2374             : 
    2375             : /* PyObjectFastCall.proto */
    2376             : #define __Pyx_PyObject_FastCall(func, args, nargs)  __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
    2377             : static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs);
    2378             : 
    2379             : /* RaiseUnexpectedTypeError.proto */
    2380             : static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj);
    2381             : 
    2382             : /* GCCDiagnostics.proto */
    2383             : #if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
    2384             : #define __Pyx_HAS_GCC_DIAGNOSTIC
    2385             : #endif
    2386             : 
    2387             : /* BuildPyUnicode.proto */
    2388             : static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength,
    2389             :                                                 int prepend_sign, char padding_char);
    2390             : 
    2391             : /* CIntToPyUnicode.proto */
    2392             : static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char);
    2393             : 
    2394             : /* CIntToPyUnicode.proto */
    2395             : static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char);
    2396             : 
    2397             : /* JoinPyUnicode.proto */
    2398             : static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
    2399             :                                       Py_UCS4 max_char);
    2400             : 
    2401             : /* StrEquals.proto */
    2402             : #if PY_MAJOR_VERSION >= 3
    2403             : #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
    2404             : #else
    2405             : #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
    2406             : #endif
    2407             : 
    2408             : /* PyObjectFormatSimple.proto */
    2409             : #if CYTHON_COMPILING_IN_PYPY
    2410             :     #define __Pyx_PyObject_FormatSimple(s, f) (\
    2411             :         likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
    2412             :         PyObject_Format(s, f))
    2413             : #elif PY_MAJOR_VERSION < 3
    2414             :     #define __Pyx_PyObject_FormatSimple(s, f) (\
    2415             :         likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
    2416             :         likely(PyString_CheckExact(s)) ? PyUnicode_FromEncodedObject(s, NULL, "strict") :\
    2417             :         PyObject_Format(s, f))
    2418             : #elif CYTHON_USE_TYPE_SLOTS
    2419             :     #define __Pyx_PyObject_FormatSimple(s, f) (\
    2420             :         likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
    2421             :         likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_repr(s) :\
    2422             :         likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_repr(s) :\
    2423             :         PyObject_Format(s, f))
    2424             : #else
    2425             :     #define __Pyx_PyObject_FormatSimple(s, f) (\
    2426             :         likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
    2427             :         PyObject_Format(s, f))
    2428             : #endif
    2429             : 
    2430             : CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
    2431             : static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/
    2432             : /* GetAttr.proto */
    2433             : static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
    2434             : 
    2435             : /* GetItemInt.proto */
    2436             : #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    2437             :     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    2438             :     __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
    2439             :     (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
    2440             :                __Pyx_GetItemInt_Generic(o, to_py_func(i))))
    2441             : #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    2442             :     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    2443             :     __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    2444             :     (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
    2445             : static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
    2446             :                                                               int wraparound, int boundscheck);
    2447             : #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    2448             :     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    2449             :     __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    2450             :     (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
    2451             : static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
    2452             :                                                               int wraparound, int boundscheck);
    2453             : static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
    2454             : static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
    2455             :                                                      int is_list, int wraparound, int boundscheck);
    2456             : 
    2457             : /* PyObjectCallOneArg.proto */
    2458             : static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
    2459             : 
    2460             : /* ObjectGetItem.proto */
    2461             : #if CYTHON_USE_TYPE_SLOTS
    2462             : static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key);
    2463             : #else
    2464             : #define __Pyx_PyObject_GetItem(obj, key)  PyObject_GetItem(obj, key)
    2465             : #endif
    2466             : 
    2467             : /* KeywordStringCheck.proto */
    2468             : static int __Pyx_CheckKeywordStrings(PyObject *kw, const char* function_name, int kw_allowed);
    2469             : 
    2470             : /* DivInt[Py_ssize_t].proto */
    2471             : static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t);
    2472             : 
    2473             : /* UnaryNegOverflows.proto */
    2474             : #define __Pyx_UNARY_NEG_WOULD_OVERFLOW(x)\
    2475             :         (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
    2476             : 
    2477             : /* GetAttr3.proto */
    2478             : static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
    2479             : 
    2480             : /* PyDictVersioning.proto */
    2481             : #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
    2482             : #define __PYX_DICT_VERSION_INIT  ((PY_UINT64_T) -1)
    2483             : #define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
    2484             : #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
    2485             :     (version_var) = __PYX_GET_DICT_VERSION(dict);\
    2486             :     (cache_var) = (value);
    2487             : #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
    2488             :     static PY_UINT64_T __pyx_dict_version = 0;\
    2489             :     static PyObject *__pyx_dict_cached_value = NULL;\
    2490             :     if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
    2491             :         (VAR) = __pyx_dict_cached_value;\
    2492             :     } else {\
    2493             :         (VAR) = __pyx_dict_cached_value = (LOOKUP);\
    2494             :         __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
    2495             :     }\
    2496             : }
    2497             : static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
    2498             : static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
    2499             : static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
    2500             : #else
    2501             : #define __PYX_GET_DICT_VERSION(dict)  (0)
    2502             : #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
    2503             : #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
    2504             : #endif
    2505             : 
    2506             : /* GetModuleGlobalName.proto */
    2507             : #if CYTHON_USE_DICT_VERSIONS
    2508             : #define __Pyx_GetModuleGlobalName(var, name)  do {\
    2509             :     static PY_UINT64_T __pyx_dict_version = 0;\
    2510             :     static PyObject *__pyx_dict_cached_value = NULL;\
    2511             :     (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
    2512             :         (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
    2513             :         __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
    2514             : } while(0)
    2515             : #define __Pyx_GetModuleGlobalNameUncached(var, name)  do {\
    2516             :     PY_UINT64_T __pyx_dict_version;\
    2517             :     PyObject *__pyx_dict_cached_value;\
    2518             :     (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
    2519             : } while(0)
    2520             : static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
    2521             : #else
    2522             : #define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
    2523             : #define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
    2524             : static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
    2525             : #endif
    2526             : 
    2527             : /* AssertionsEnabled.proto */
    2528             : #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
    2529             :   #define __Pyx_init_assertions_enabled()  (0)
    2530             :   #define __pyx_assertions_enabled()  (1)
    2531             : #elif CYTHON_COMPILING_IN_LIMITED_API  ||  (CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030C0000)
    2532             :   static int __pyx_assertions_enabled_flag;
    2533             :   #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag)
    2534           1 :   static int __Pyx_init_assertions_enabled(void) {
    2535           1 :     PyObject *builtins, *debug, *debug_str;
    2536           1 :     int flag;
    2537           1 :     builtins = PyEval_GetBuiltins();
    2538           1 :     if (!builtins) goto bad;
    2539           1 :     debug_str = PyUnicode_FromStringAndSize("__debug__", 9);
    2540           1 :     if (!debug_str) goto bad;
    2541           1 :     debug = PyObject_GetItem(builtins, debug_str);
    2542           1 :     Py_DECREF(debug_str);
    2543           1 :     if (!debug) goto bad;
    2544           1 :     flag = PyObject_IsTrue(debug);
    2545           1 :     Py_DECREF(debug);
    2546           1 :     if (flag == -1) goto bad;
    2547           1 :     __pyx_assertions_enabled_flag = flag;
    2548           1 :     return 0;
    2549           0 :   bad:
    2550           0 :     __pyx_assertions_enabled_flag = 1;
    2551           0 :     return -1;
    2552             :   }
    2553             : #else
    2554             :   #define __Pyx_init_assertions_enabled()  (0)
    2555             :   #define __pyx_assertions_enabled()  (!Py_OptimizeFlag)
    2556             : #endif
    2557             : 
    2558             : /* RaiseTooManyValuesToUnpack.proto */
    2559             : static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
    2560             : 
    2561             : /* RaiseNeedMoreValuesToUnpack.proto */
    2562             : static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
    2563             : 
    2564             : /* RaiseNoneIterError.proto */
    2565             : static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
    2566             : 
    2567             : /* ExtTypeTest.proto */
    2568             : static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
    2569             : 
    2570             : /* GetTopmostException.proto */
    2571             : #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
    2572             : static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
    2573             : #endif
    2574             : 
    2575             : /* SaveResetException.proto */
    2576             : #if CYTHON_FAST_THREAD_STATE
    2577             : #define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
    2578             : static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
    2579             : #define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
    2580             : static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
    2581             : #else
    2582             : #define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
    2583             : #define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
    2584             : #endif
    2585             : 
    2586             : /* GetException.proto */
    2587             : #if CYTHON_FAST_THREAD_STATE
    2588             : #define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
    2589             : static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
    2590             : #else
    2591             : static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
    2592             : #endif
    2593             : 
    2594             : /* SwapException.proto */
    2595             : #if CYTHON_FAST_THREAD_STATE
    2596             : #define __Pyx_ExceptionSwap(type, value, tb)  __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
    2597             : static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
    2598             : #else
    2599             : static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
    2600             : #endif
    2601             : 
    2602             : /* Import.proto */
    2603             : static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
    2604             : 
    2605             : /* ImportDottedModule.proto */
    2606             : static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple);
    2607             : #if PY_MAJOR_VERSION >= 3
    2608             : static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple);
    2609             : #endif
    2610             : 
    2611             : /* FastTypeChecks.proto */
    2612             : #if CYTHON_COMPILING_IN_CPYTHON
    2613             : #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
    2614             : #define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2)
    2615             : static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
    2616             : static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b);
    2617             : static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
    2618             : static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
    2619             : #else
    2620             : #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
    2621             : #define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2))
    2622             : #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
    2623             : #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
    2624             : #endif
    2625             : #define __Pyx_PyErr_ExceptionMatches2(err1, err2)  __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2)
    2626             : #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
    2627             : 
    2628             : CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
    2629             : /* ListCompAppend.proto */
    2630             : #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
    2631           0 : static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
    2632           0 :     PyListObject* L = (PyListObject*) list;
    2633           0 :     Py_ssize_t len = Py_SIZE(list);
    2634           0 :     if (likely(L->allocated > len)) {
    2635           0 :         Py_INCREF(x);
    2636             :         #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
    2637             :         L->ob_item[len] = x;
    2638             :         #else
    2639           0 :         PyList_SET_ITEM(list, len, x);
    2640             :         #endif
    2641           0 :         __Pyx_SET_SIZE(list, len + 1);
    2642           0 :         return 0;
    2643             :     }
    2644           0 :     return PyList_Append(list, x);
    2645             : }
    2646             : #else
    2647             : #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
    2648             : #endif
    2649             : 
    2650             : /* PySequenceMultiply.proto */
    2651             : #define __Pyx_PySequence_Multiply_Left(mul, seq)  __Pyx_PySequence_Multiply(seq, mul)
    2652             : static CYTHON_INLINE PyObject* __Pyx_PySequence_Multiply(PyObject *seq, Py_ssize_t mul);
    2653             : 
    2654             : /* SetItemInt.proto */
    2655             : #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    2656             :     (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    2657             :     __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
    2658             :     (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
    2659             :                __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
    2660             : static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
    2661             : static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
    2662             :                                                int is_list, int wraparound, int boundscheck);
    2663             : 
    2664             : /* RaiseUnboundLocalError.proto */
    2665             : static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
    2666             : 
    2667             : /* DivInt[long].proto */
    2668             : static CYTHON_INLINE long __Pyx_div_long(long, long);
    2669             : 
    2670             : /* PySequenceContains.proto */
    2671           0 : static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
    2672           0 :     int result = PySequence_Contains(seq, item);
    2673           0 :     return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
    2674             : }
    2675             : 
    2676             : /* ImportFrom.proto */
    2677             : static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
    2678             : 
    2679             : /* HasAttr.proto */
    2680             : static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
    2681             : 
    2682             : /* IsLittleEndian.proto */
    2683             : static CYTHON_INLINE int __Pyx_Is_Little_Endian(void);
    2684             : 
    2685             : /* BufferFormatCheck.proto */
    2686             : static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts);
    2687             : static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
    2688             :                               __Pyx_BufFmt_StackElem* stack,
    2689             :                               __Pyx_TypeInfo* type);
    2690             : 
    2691             : /* BufferGetAndValidate.proto */
    2692             : #define __Pyx_GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack)\
    2693             :     ((obj == Py_None || obj == NULL) ?\
    2694             :     (__Pyx_ZeroBuffer(buf), 0) :\
    2695             :     __Pyx__GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack))
    2696             : static int  __Pyx__GetBufferAndValidate(Py_buffer* buf, PyObject* obj,
    2697             :     __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack);
    2698             : static void __Pyx_ZeroBuffer(Py_buffer* buf);
    2699             : static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info);
    2700             : static Py_ssize_t __Pyx_minusones[] = { -1, -1, -1, -1, -1, -1, -1, -1 };
    2701             : static Py_ssize_t __Pyx_zeros[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
    2702             : 
    2703             : #define __Pyx_BufPtrStrided2d(type, buf, i0, s0, i1, s1) (type)((char*)buf + i0 * s0 + i1 * s1)
    2704             : /* WriteUnraisableException.proto */
    2705             : static void __Pyx_WriteUnraisable(const char *name, int clineno,
    2706             :                                   int lineno, const char *filename,
    2707             :                                   int full_traceback, int nogil);
    2708             : 
    2709             : /* PyObject_GenericGetAttrNoDict.proto */
    2710             : #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
    2711             : static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
    2712             : #else
    2713             : #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
    2714             : #endif
    2715             : 
    2716             : /* PyObject_GenericGetAttr.proto */
    2717             : #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
    2718             : static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
    2719             : #else
    2720             : #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
    2721             : #endif
    2722             : 
    2723             : /* IncludeStructmemberH.proto */
    2724             : #include <structmember.h>
    2725             : 
    2726             : /* FixUpExtensionType.proto */
    2727             : #if CYTHON_USE_TYPE_SPECS
    2728             : static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);
    2729             : #endif
    2730             : 
    2731             : /* PyObjectCallNoArg.proto */
    2732             : static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
    2733             : 
    2734             : /* PyObjectGetMethod.proto */
    2735             : static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
    2736             : 
    2737             : /* PyObjectCallMethod0.proto */
    2738             : static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);
    2739             : 
    2740             : /* ValidateBasesTuple.proto */
    2741             : #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
    2742             : static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases);
    2743             : #endif
    2744             : 
    2745             : /* PyType_Ready.proto */
    2746             : CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t);
    2747             : 
    2748             : /* SetVTable.proto */
    2749             : static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable);
    2750             : 
    2751             : /* GetVTable.proto */
    2752             : static void* __Pyx_GetVtable(PyTypeObject *type);
    2753             : 
    2754             : /* MergeVTables.proto */
    2755             : #if !CYTHON_COMPILING_IN_LIMITED_API
    2756             : static int __Pyx_MergeVtables(PyTypeObject *type);
    2757             : #endif
    2758             : 
    2759             : /* SetupReduce.proto */
    2760             : #if !CYTHON_COMPILING_IN_LIMITED_API
    2761             : static int __Pyx_setup_reduce(PyObject* type_obj);
    2762             : #endif
    2763             : 
    2764             : /* TypeImport.proto */
    2765             : #ifndef __PYX_HAVE_RT_ImportType_proto_3_0_11
    2766             : #define __PYX_HAVE_RT_ImportType_proto_3_0_11
    2767             : #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
    2768             : #include <stdalign.h>
    2769             : #endif
    2770             : #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L
    2771             : #define __PYX_GET_STRUCT_ALIGNMENT_3_0_11(s) alignof(s)
    2772             : #else
    2773             : #define __PYX_GET_STRUCT_ALIGNMENT_3_0_11(s) sizeof(void*)
    2774             : #endif
    2775             : enum __Pyx_ImportType_CheckSize_3_0_11 {
    2776             :    __Pyx_ImportType_CheckSize_Error_3_0_11 = 0,
    2777             :    __Pyx_ImportType_CheckSize_Warn_3_0_11 = 1,
    2778             :    __Pyx_ImportType_CheckSize_Ignore_3_0_11 = 2
    2779             : };
    2780             : static PyTypeObject *__Pyx_ImportType_3_0_11(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_11 check_size);
    2781             : #endif
    2782             : 
    2783             : /* FetchSharedCythonModule.proto */
    2784             : static PyObject *__Pyx_FetchSharedCythonABIModule(void);
    2785             : 
    2786             : /* FetchCommonType.proto */
    2787             : #if !CYTHON_USE_TYPE_SPECS
    2788             : static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
    2789             : #else
    2790             : static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases);
    2791             : #endif
    2792             : 
    2793             : /* PyMethodNew.proto */
    2794             : #if CYTHON_COMPILING_IN_LIMITED_API
    2795             : static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    2796             :     PyObject *typesModule=NULL, *methodType=NULL, *result=NULL;
    2797             :     CYTHON_UNUSED_VAR(typ);
    2798             :     if (!self)
    2799             :         return __Pyx_NewRef(func);
    2800             :     typesModule = PyImport_ImportModule("types");
    2801             :     if (!typesModule) return NULL;
    2802             :     methodType = PyObject_GetAttrString(typesModule, "MethodType");
    2803             :     Py_DECREF(typesModule);
    2804             :     if (!methodType) return NULL;
    2805             :     result = PyObject_CallFunctionObjArgs(methodType, func, self, NULL);
    2806             :     Py_DECREF(methodType);
    2807             :     return result;
    2808             : }
    2809             : #elif PY_MAJOR_VERSION >= 3
    2810           0 : static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    2811           0 :     CYTHON_UNUSED_VAR(typ);
    2812           0 :     if (!self)
    2813           0 :         return __Pyx_NewRef(func);
    2814           0 :     return PyMethod_New(func, self);
    2815             : }
    2816             : #else
    2817             :     #define __Pyx_PyMethod_New PyMethod_New
    2818             : #endif
    2819             : 
    2820             : /* PyVectorcallFastCallDict.proto */
    2821             : #if CYTHON_METH_FASTCALL
    2822             : static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw);
    2823             : #endif
    2824             : 
    2825             : /* CythonFunctionShared.proto */
    2826             : #define __Pyx_CyFunction_USED
    2827             : #define __Pyx_CYFUNCTION_STATICMETHOD  0x01
    2828             : #define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
    2829             : #define __Pyx_CYFUNCTION_CCLASS        0x04
    2830             : #define __Pyx_CYFUNCTION_COROUTINE     0x08
    2831             : #define __Pyx_CyFunction_GetClosure(f)\
    2832             :     (((__pyx_CyFunctionObject *) (f))->func_closure)
    2833             : #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    2834             :   #define __Pyx_CyFunction_GetClassObj(f)\
    2835             :       (((__pyx_CyFunctionObject *) (f))->func_classobj)
    2836             : #else
    2837             :   #define __Pyx_CyFunction_GetClassObj(f)\
    2838             :       ((PyObject*) ((PyCMethodObject *) (f))->mm_class)
    2839             : #endif
    2840             : #define __Pyx_CyFunction_SetClassObj(f, classobj)\
    2841             :     __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj))
    2842             : #define __Pyx_CyFunction_Defaults(type, f)\
    2843             :     ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
    2844             : #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
    2845             :     ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
    2846             : typedef struct {
    2847             : #if CYTHON_COMPILING_IN_LIMITED_API
    2848             :     PyObject_HEAD
    2849             :     PyObject *func;
    2850             : #elif PY_VERSION_HEX < 0x030900B1
    2851             :     PyCFunctionObject func;
    2852             : #else
    2853             :     PyCMethodObject func;
    2854             : #endif
    2855             : #if CYTHON_BACKPORT_VECTORCALL
    2856             :     __pyx_vectorcallfunc func_vectorcall;
    2857             : #endif
    2858             : #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
    2859             :     PyObject *func_weakreflist;
    2860             : #endif
    2861             :     PyObject *func_dict;
    2862             :     PyObject *func_name;
    2863             :     PyObject *func_qualname;
    2864             :     PyObject *func_doc;
    2865             :     PyObject *func_globals;
    2866             :     PyObject *func_code;
    2867             :     PyObject *func_closure;
    2868             : #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    2869             :     PyObject *func_classobj;
    2870             : #endif
    2871             :     void *defaults;
    2872             :     int defaults_pyobjects;
    2873             :     size_t defaults_size;
    2874             :     int flags;
    2875             :     PyObject *defaults_tuple;
    2876             :     PyObject *defaults_kwdict;
    2877             :     PyObject *(*defaults_getter)(PyObject *);
    2878             :     PyObject *func_annotations;
    2879             :     PyObject *func_is_coroutine;
    2880             : } __pyx_CyFunctionObject;
    2881             : #undef __Pyx_CyOrPyCFunction_Check
    2882             : #define __Pyx_CyFunction_Check(obj)  __Pyx_TypeCheck(obj, __pyx_CyFunctionType)
    2883             : #define __Pyx_CyOrPyCFunction_Check(obj)  __Pyx_TypeCheck2(obj, __pyx_CyFunctionType, &PyCFunction_Type)
    2884             : #define __Pyx_CyFunction_CheckExact(obj)  __Pyx_IS_TYPE(obj, __pyx_CyFunctionType)
    2885             : static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc);
    2886             : #undef __Pyx_IsSameCFunction
    2887             : #define __Pyx_IsSameCFunction(func, cfunc)   __Pyx__IsSameCyOrCFunction(func, cfunc)
    2888             : static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
    2889             :                                       int flags, PyObject* qualname,
    2890             :                                       PyObject *closure,
    2891             :                                       PyObject *module, PyObject *globals,
    2892             :                                       PyObject* code);
    2893             : static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj);
    2894             : static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
    2895             :                                                          size_t size,
    2896             :                                                          int pyobjects);
    2897             : static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
    2898             :                                                             PyObject *tuple);
    2899             : static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
    2900             :                                                              PyObject *dict);
    2901             : static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
    2902             :                                                               PyObject *dict);
    2903             : static int __pyx_CyFunction_init(PyObject *module);
    2904             : #if CYTHON_METH_FASTCALL
    2905             : static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
    2906             : static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
    2907             : static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
    2908             : static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
    2909             : #if CYTHON_BACKPORT_VECTORCALL
    2910             : #define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall)
    2911             : #else
    2912             : #define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
    2913             : #endif
    2914             : #endif
    2915             : 
    2916             : /* CythonFunction.proto */
    2917             : static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
    2918             :                                       int flags, PyObject* qualname,
    2919             :                                       PyObject *closure,
    2920             :                                       PyObject *module, PyObject *globals,
    2921             :                                       PyObject* code);
    2922             : 
    2923             : /* CLineInTraceback.proto */
    2924             : #ifdef CYTHON_CLINE_IN_TRACEBACK
    2925             : #define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
    2926             : #else
    2927             : static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
    2928             : #endif
    2929             : 
    2930             : /* CodeObjectCache.proto */
    2931             : #if !CYTHON_COMPILING_IN_LIMITED_API
    2932             : typedef struct {
    2933             :     PyCodeObject* code_object;
    2934             :     int code_line;
    2935             : } __Pyx_CodeObjectCacheEntry;
    2936             : struct __Pyx_CodeObjectCache {
    2937             :     int count;
    2938             :     int max_count;
    2939             :     __Pyx_CodeObjectCacheEntry* entries;
    2940             : };
    2941             : static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
    2942             : static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
    2943             : static PyCodeObject *__pyx_find_code_object(int code_line);
    2944             : static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
    2945             : #endif
    2946             : 
    2947             : /* AddTraceback.proto */
    2948             : static void __Pyx_AddTraceback(const char *funcname, int c_line,
    2949             :                                int py_line, const char *filename);
    2950             : 
    2951             : #if PY_MAJOR_VERSION < 3
    2952             :     static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
    2953             :     static void __Pyx_ReleaseBuffer(Py_buffer *view);
    2954             : #else
    2955             :     #define __Pyx_GetBuffer PyObject_GetBuffer
    2956             :     #define __Pyx_ReleaseBuffer PyBuffer_Release
    2957             : #endif
    2958             : 
    2959             : 
    2960             : /* BufferStructDeclare.proto */
    2961             : typedef struct {
    2962             :   Py_ssize_t shape, strides, suboffsets;
    2963             : } __Pyx_Buf_DimInfo;
    2964             : typedef struct {
    2965             :   size_t refcount;
    2966             :   Py_buffer pybuffer;
    2967             : } __Pyx_Buffer;
    2968             : typedef struct {
    2969             :   __Pyx_Buffer *rcbuffer;
    2970             :   char *data;
    2971             :   __Pyx_Buf_DimInfo diminfo[8];
    2972             : } __Pyx_LocalBuf_ND;
    2973             : 
    2974             : /* MemviewSliceIsContig.proto */
    2975             : static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim);
    2976             : 
    2977             : /* OverlappingSlices.proto */
    2978             : static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
    2979             :                                 __Pyx_memviewslice *slice2,
    2980             :                                 int ndim, size_t itemsize);
    2981             : 
    2982             : /* RealImag.proto */
    2983             : #if CYTHON_CCOMPLEX
    2984             :   #ifdef __cplusplus
    2985             :     #define __Pyx_CREAL(z) ((z).real())
    2986             :     #define __Pyx_CIMAG(z) ((z).imag())
    2987             :   #else
    2988             :     #define __Pyx_CREAL(z) (__real__(z))
    2989             :     #define __Pyx_CIMAG(z) (__imag__(z))
    2990             :   #endif
    2991             : #else
    2992             :     #define __Pyx_CREAL(z) ((z).real)
    2993             :     #define __Pyx_CIMAG(z) ((z).imag)
    2994             : #endif
    2995             : #if defined(__cplusplus) && CYTHON_CCOMPLEX\
    2996             :         && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
    2997             :     #define __Pyx_SET_CREAL(z,x) ((z).real(x))
    2998             :     #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
    2999             : #else
    3000             :     #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
    3001             :     #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
    3002             : #endif
    3003             : 
    3004             : /* Arithmetic.proto */
    3005             : #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
    3006             :     #define __Pyx_c_eq_float(a, b)   ((a)==(b))
    3007             :     #define __Pyx_c_sum_float(a, b)  ((a)+(b))
    3008             :     #define __Pyx_c_diff_float(a, b) ((a)-(b))
    3009             :     #define __Pyx_c_prod_float(a, b) ((a)*(b))
    3010             :     #define __Pyx_c_quot_float(a, b) ((a)/(b))
    3011             :     #define __Pyx_c_neg_float(a)     (-(a))
    3012             :   #ifdef __cplusplus
    3013             :     #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
    3014             :     #define __Pyx_c_conj_float(z)    (::std::conj(z))
    3015             :     #if 1
    3016             :         #define __Pyx_c_abs_float(z)     (::std::abs(z))
    3017             :         #define __Pyx_c_pow_float(a, b)  (::std::pow(a, b))
    3018             :     #endif
    3019             :   #else
    3020             :     #define __Pyx_c_is_zero_float(z) ((z)==0)
    3021             :     #define __Pyx_c_conj_float(z)    (conjf(z))
    3022             :     #if 1
    3023             :         #define __Pyx_c_abs_float(z)     (cabsf(z))
    3024             :         #define __Pyx_c_pow_float(a, b)  (cpowf(a, b))
    3025             :     #endif
    3026             :  #endif
    3027             : #else
    3028             :     static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
    3029             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
    3030             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
    3031             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
    3032             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
    3033             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
    3034             :     static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
    3035             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
    3036             :     #if 1
    3037             :         static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
    3038             :         static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
    3039             :     #endif
    3040             : #endif
    3041             : 
    3042             : /* Arithmetic.proto */
    3043             : #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
    3044             :     #define __Pyx_c_eq_double(a, b)   ((a)==(b))
    3045             :     #define __Pyx_c_sum_double(a, b)  ((a)+(b))
    3046             :     #define __Pyx_c_diff_double(a, b) ((a)-(b))
    3047             :     #define __Pyx_c_prod_double(a, b) ((a)*(b))
    3048             :     #define __Pyx_c_quot_double(a, b) ((a)/(b))
    3049             :     #define __Pyx_c_neg_double(a)     (-(a))
    3050             :   #ifdef __cplusplus
    3051             :     #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
    3052             :     #define __Pyx_c_conj_double(z)    (::std::conj(z))
    3053             :     #if 1
    3054             :         #define __Pyx_c_abs_double(z)     (::std::abs(z))
    3055             :         #define __Pyx_c_pow_double(a, b)  (::std::pow(a, b))
    3056             :     #endif
    3057             :   #else
    3058             :     #define __Pyx_c_is_zero_double(z) ((z)==0)
    3059             :     #define __Pyx_c_conj_double(z)    (conj(z))
    3060             :     #if 1
    3061             :         #define __Pyx_c_abs_double(z)     (cabs(z))
    3062             :         #define __Pyx_c_pow_double(a, b)  (cpow(a, b))
    3063             :     #endif
    3064             :  #endif
    3065             : #else
    3066             :     static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
    3067             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
    3068             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
    3069             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
    3070             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
    3071             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
    3072             :     static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
    3073             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
    3074             :     #if 1
    3075             :         static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
    3076             :         static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
    3077             :     #endif
    3078             : #endif
    3079             : 
    3080             : /* TypeInfoCompare.proto */
    3081             : static int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b);
    3082             : 
    3083             : /* MemviewSliceValidateAndInit.proto */
    3084             : static int __Pyx_ValidateAndInit_memviewslice(
    3085             :                 int *axes_specs,
    3086             :                 int c_or_f_flag,
    3087             :                 int buf_flags,
    3088             :                 int ndim,
    3089             :                 __Pyx_TypeInfo *dtype,
    3090             :                 __Pyx_BufFmt_StackElem stack[],
    3091             :                 __Pyx_memviewslice *memviewslice,
    3092             :                 PyObject *original_obj);
    3093             : 
    3094             : /* ObjectToMemviewSlice.proto */
    3095             : static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_int(PyObject *, int writable_flag);
    3096             : 
    3097             : /* Arithmetic.proto */
    3098             : #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
    3099             :     #define __Pyx_c_eq_long__double(a, b)   ((a)==(b))
    3100             :     #define __Pyx_c_sum_long__double(a, b)  ((a)+(b))
    3101             :     #define __Pyx_c_diff_long__double(a, b) ((a)-(b))
    3102             :     #define __Pyx_c_prod_long__double(a, b) ((a)*(b))
    3103             :     #define __Pyx_c_quot_long__double(a, b) ((a)/(b))
    3104             :     #define __Pyx_c_neg_long__double(a)     (-(a))
    3105             :   #ifdef __cplusplus
    3106             :     #define __Pyx_c_is_zero_long__double(z) ((z)==(long double)0)
    3107             :     #define __Pyx_c_conj_long__double(z)    (::std::conj(z))
    3108             :     #if 1
    3109             :         #define __Pyx_c_abs_long__double(z)     (::std::abs(z))
    3110             :         #define __Pyx_c_pow_long__double(a, b)  (::std::pow(a, b))
    3111             :     #endif
    3112             :   #else
    3113             :     #define __Pyx_c_is_zero_long__double(z) ((z)==0)
    3114             :     #define __Pyx_c_conj_long__double(z)    (conjl(z))
    3115             :     #if 1
    3116             :         #define __Pyx_c_abs_long__double(z)     (cabsl(z))
    3117             :         #define __Pyx_c_pow_long__double(a, b)  (cpowl(a, b))
    3118             :     #endif
    3119             :  #endif
    3120             : #else
    3121             :     static CYTHON_INLINE int __Pyx_c_eq_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
    3122             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_sum_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
    3123             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_diff_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
    3124             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_prod_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
    3125             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
    3126             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_neg_long__double(__pyx_t_long_double_complex);
    3127             :     static CYTHON_INLINE int __Pyx_c_is_zero_long__double(__pyx_t_long_double_complex);
    3128             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_conj_long__double(__pyx_t_long_double_complex);
    3129             :     #if 1
    3130             :         static CYTHON_INLINE long double __Pyx_c_abs_long__double(__pyx_t_long_double_complex);
    3131             :         static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_pow_long__double(__pyx_t_long_double_complex, __pyx_t_long_double_complex);
    3132             :     #endif
    3133             : #endif
    3134             : 
    3135             : /* MemviewSliceCopyTemplate.proto */
    3136             : static __Pyx_memviewslice
    3137             : __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
    3138             :                                  const char *mode, int ndim,
    3139             :                                  size_t sizeof_dtype, int contig_flag,
    3140             :                                  int dtype_is_object);
    3141             : 
    3142             : /* MemviewSliceInit.proto */
    3143             : #define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d
    3144             : #define __Pyx_MEMVIEW_DIRECT   1
    3145             : #define __Pyx_MEMVIEW_PTR      2
    3146             : #define __Pyx_MEMVIEW_FULL     4
    3147             : #define __Pyx_MEMVIEW_CONTIG   8
    3148             : #define __Pyx_MEMVIEW_STRIDED  16
    3149             : #define __Pyx_MEMVIEW_FOLLOW   32
    3150             : #define __Pyx_IS_C_CONTIG 1
    3151             : #define __Pyx_IS_F_CONTIG 2
    3152             : static int __Pyx_init_memviewslice(
    3153             :                 struct __pyx_memoryview_obj *memview,
    3154             :                 int ndim,
    3155             :                 __Pyx_memviewslice *memviewslice,
    3156             :                 int memview_is_new_reference);
    3157             : static CYTHON_INLINE int __pyx_add_acquisition_count_locked(
    3158             :     __pyx_atomic_int_type *acquisition_count, PyThread_type_lock lock);
    3159             : static CYTHON_INLINE int __pyx_sub_acquisition_count_locked(
    3160             :     __pyx_atomic_int_type *acquisition_count, PyThread_type_lock lock);
    3161             : #define __pyx_get_slice_count_pointer(memview) (&memview->acquisition_count)
    3162             : #define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__)
    3163             : #define __PYX_XCLEAR_MEMVIEW(slice, have_gil) __Pyx_XCLEAR_MEMVIEW(slice, have_gil, __LINE__)
    3164             : static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int);
    3165             : static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *, int, int);
    3166             : 
    3167             : /* CIntToPy.proto */
    3168             : static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
    3169             : 
    3170             : /* CIntFromPy.proto */
    3171             : static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
    3172             : 
    3173             : /* CIntToPy.proto */
    3174             : static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
    3175             : 
    3176             : /* CIntFromPy.proto */
    3177             : static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
    3178             : 
    3179             : /* CIntFromPy.proto */
    3180             : static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);
    3181             : 
    3182             : /* FormatTypeName.proto */
    3183             : #if CYTHON_COMPILING_IN_LIMITED_API
    3184             : typedef PyObject *__Pyx_TypeName;
    3185             : #define __Pyx_FMT_TYPENAME "%U"
    3186             : static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp);
    3187             : #define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
    3188             : #else
    3189             : typedef const char *__Pyx_TypeName;
    3190             : #define __Pyx_FMT_TYPENAME "%.200s"
    3191             : #define __Pyx_PyType_GetName(tp) ((tp)->tp_name)
    3192             : #define __Pyx_DECREF_TypeName(obj)
    3193             : #endif
    3194             : 
    3195             : /* CheckBinaryVersion.proto */
    3196             : static unsigned long __Pyx_get_runtime_version(void);
    3197             : static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer);
    3198             : 
    3199             : /* FunctionImport.proto */
    3200             : static int __Pyx_ImportFunction_3_0_11(PyObject *module, const char *funcname, void (**f)(void), const char *sig);
    3201             : 
    3202             : /* InitStrings.proto */
    3203             : static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
    3204             : 
    3205             : /* #### Code section: module_declarations ### */
    3206             : static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/
    3207             : static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/
    3208             : static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
    3209             : static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/
    3210             : static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value); /* proto*/
    3211             : static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/
    3212             : static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
    3213             : static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
    3214             : static PyObject *__pyx_memoryview__get_base(struct __pyx_memoryview_obj *__pyx_v_self); /* proto*/
    3215             : static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
    3216             : static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
    3217             : static PyObject *__pyx_memoryviewslice__get_base(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto*/
    3218             : static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize_itemsize(PyArray_Descr *__pyx_v_self); /* proto*/
    3219             : static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment_alignment(PyArray_Descr *__pyx_v_self); /* proto*/
    3220             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields_fields(PyArray_Descr *__pyx_v_self); /* proto*/
    3221             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names_names(PyArray_Descr *__pyx_v_self); /* proto*/
    3222             : static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray_subarray(PyArray_Descr *__pyx_v_self); /* proto*/
    3223             : static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags_flags(PyArray_Descr *__pyx_v_self); /* proto*/
    3224             : static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter_numiter(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
    3225             : static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size_size(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
    3226             : static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index_index(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
    3227             : static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd_nd(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
    3228             : static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions_dimensions(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
    3229             : static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters_iters(PyArrayMultiIterObject *__pyx_v_self); /* proto*/
    3230             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject *__pyx_v_self); /* proto*/
    3231             : static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArrayObject *__pyx_v_self); /* proto*/
    3232             : static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx_v_self); /* proto*/
    3233             : static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObject *__pyx_v_self); /* proto*/
    3234             : static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayObject *__pyx_v_self); /* proto*/
    3235             : static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject *__pyx_v_self); /* proto*/
    3236             : static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__pyx_v_self); /* proto*/
    3237             : 
    3238             : /* Module declarations from "cython.view" */
    3239             : 
    3240             : /* Module declarations from "cython.dataclasses" */
    3241             : 
    3242             : /* Module declarations from "cython" */
    3243             : 
    3244             : /* Module declarations from "cpython.mem" */
    3245             : 
    3246             : /* Module declarations from "scipy.linalg.cython_lapack" */
    3247             : static void (*__pyx_f_5scipy_6linalg_13cython_lapack_cgetrf)(int *, int *, __pyx_t_float_complex *, int *, int *, int *); /*proto*/
    3248             : static void (*__pyx_f_5scipy_6linalg_13cython_lapack_dgetrf)(int *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_d *, int *, int *, int *); /*proto*/
    3249             : static void (*__pyx_f_5scipy_6linalg_13cython_lapack_sgetrf)(int *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_s *, int *, int *, int *); /*proto*/
    3250             : static void (*__pyx_f_5scipy_6linalg_13cython_lapack_zgetrf)(int *, int *, __pyx_t_double_complex *, int *, int *, int *); /*proto*/
    3251             : 
    3252             : /* Module declarations from "libc.string" */
    3253             : 
    3254             : /* Module declarations from "libc.stdio" */
    3255             : 
    3256             : /* Module declarations from "__builtin__" */
    3257             : 
    3258             : /* Module declarations from "cpython.type" */
    3259             : 
    3260             : /* Module declarations from "cpython" */
    3261             : 
    3262             : /* Module declarations from "cpython.object" */
    3263             : 
    3264             : /* Module declarations from "cpython.ref" */
    3265             : 
    3266             : /* Module declarations from "numpy" */
    3267             : 
    3268             : /* Module declarations from "numpy" */
    3269             : static CYTHON_INLINE int __pyx_f_5numpy_import_array(void); /*proto*/
    3270             : 
    3271             : /* Module declarations from "scipy.linalg._cythonized_array_utils" */
    3272             : static void (*__pyx_fuse_0__pyx_f_5scipy_6linalg_23_cythonized_array_utils_swap_c_and_f_layout)(float *, float *, int, int); /*proto*/
    3273             : static void (*__pyx_fuse_1__pyx_f_5scipy_6linalg_23_cythonized_array_utils_swap_c_and_f_layout)(double *, double *, int, int); /*proto*/
    3274             : static void (*__pyx_fuse_2__pyx_f_5scipy_6linalg_23_cythonized_array_utils_swap_c_and_f_layout)(__pyx_t_float_complex *, __pyx_t_float_complex *, int, int); /*proto*/
    3275             : static void (*__pyx_fuse_3__pyx_f_5scipy_6linalg_23_cythonized_array_utils_swap_c_and_f_layout)(__pyx_t_double_complex *, __pyx_t_double_complex *, int, int); /*proto*/
    3276             : 
    3277             : /* Module declarations from "scipy.linalg._decomp_lu_cython" */
    3278             : static PyObject *__pyx_collections_abc_Sequence = 0;
    3279             : static PyObject *generic = 0;
    3280             : static PyObject *strided = 0;
    3281             : static PyObject *indirect = 0;
    3282             : static PyObject *contiguous = 0;
    3283             : static PyObject *indirect_contiguous = 0;
    3284             : static int __pyx_memoryview_thread_locks_used;
    3285             : static PyThread_type_lock __pyx_memoryview_thread_locks[8];
    3286             : static void __pyx_fuse_0__pyx_f_5scipy_6linalg_17_decomp_lu_cython_lu_decompose(PyArrayObject *, PyArrayObject *, __Pyx_memviewslice, int); /*proto*/
    3287             : static void __pyx_fuse_1__pyx_f_5scipy_6linalg_17_decomp_lu_cython_lu_decompose(PyArrayObject *, PyArrayObject *, __Pyx_memviewslice, int); /*proto*/
    3288             : static void __pyx_fuse_2__pyx_f_5scipy_6linalg_17_decomp_lu_cython_lu_decompose(PyArrayObject *, PyArrayObject *, __Pyx_memviewslice, int); /*proto*/
    3289             : static void __pyx_fuse_3__pyx_f_5scipy_6linalg_17_decomp_lu_cython_lu_decompose(PyArrayObject *, PyArrayObject *, __Pyx_memviewslice, int); /*proto*/
    3290             : static int __pyx_array_allocate_buffer(struct __pyx_array_obj *); /*proto*/
    3291             : static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/
    3292             : static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/
    3293             : static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/
    3294             : static PyObject *_unellipsify(PyObject *, int); /*proto*/
    3295             : static int assert_direct_dimensions(Py_ssize_t *, int); /*proto*/
    3296             : static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/
    3297             : static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int, int); /*proto*/
    3298             : static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/
    3299             : static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/
    3300             : static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/
    3301             : static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
    3302             : static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
    3303             : static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/
    3304             : static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
    3305             : static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/
    3306             : static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/
    3307             : static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/
    3308             : static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/
    3309             : static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/
    3310             : static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/
    3311             : static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/
    3312             : static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/
    3313             : static int __pyx_memoryview_err_dim(PyObject *, PyObject *, int); /*proto*/
    3314             : static int __pyx_memoryview_err(PyObject *, PyObject *); /*proto*/
    3315             : static int __pyx_memoryview_err_no_memory(void); /*proto*/
    3316             : static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/
    3317             : static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/
    3318             : static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/
    3319             : static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
    3320             : static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
    3321             : static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/
    3322             : static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/
    3323             : static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/
    3324             : /* #### Code section: typeinfo ### */
    3325             : static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t = { "float32_t", NULL, sizeof(__pyx_t_5numpy_float32_t), { 0 }, 0, 'R', 0, 0 };
    3326             : static __Pyx_TypeInfo __Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t = { "float64_t", NULL, sizeof(__pyx_t_5numpy_float64_t), { 0 }, 0, 'R', 0, 0 };
    3327             : static __Pyx_TypeInfo __Pyx_TypeInfo___pyx_t_float_complex = { "float complex", NULL, sizeof(__pyx_t_float_complex), { 0 }, 0, 'C', 0, 0 };
    3328             : static __Pyx_TypeInfo __Pyx_TypeInfo___pyx_t_double_complex = { "double complex", NULL, sizeof(__pyx_t_double_complex), { 0 }, 0, 'C', 0, 0 };
    3329             : static __Pyx_TypeInfo __Pyx_TypeInfo_int = { "int", NULL, sizeof(int), { 0 }, 0, __PYX_IS_UNSIGNED(int) ? 'U' : 'I', __PYX_IS_UNSIGNED(int), 0 };
    3330             : /* #### Code section: before_global_var ### */
    3331             : #define __Pyx_MODULE_NAME "scipy.linalg._decomp_lu_cython"
    3332             : extern int __pyx_module_is_main_scipy__linalg___decomp_lu_cython;
    3333             : int __pyx_module_is_main_scipy__linalg___decomp_lu_cython = 0;
    3334             : 
    3335             : /* Implementation of "scipy.linalg._decomp_lu_cython" */
    3336             : /* #### Code section: global_var ### */
    3337             : static PyObject *__pyx_builtin_MemoryError;
    3338             : static PyObject *__pyx_builtin_ValueError;
    3339             : static PyObject *__pyx_builtin_range;
    3340             : static PyObject *__pyx_builtin_TypeError;
    3341             : static PyObject *__pyx_builtin___import__;
    3342             : static PyObject *__pyx_builtin_enumerate;
    3343             : static PyObject *__pyx_builtin_AssertionError;
    3344             : static PyObject *__pyx_builtin_Ellipsis;
    3345             : static PyObject *__pyx_builtin_id;
    3346             : static PyObject *__pyx_builtin_IndexError;
    3347             : static PyObject *__pyx_builtin_ImportError;
    3348             : /* #### Code section: string_decls ### */
    3349             : static const char __pyx_k_[] = ": ";
    3350             : static const char __pyx_k_D[] = "D";
    3351             : static const char __pyx_k_F[] = "F";
    3352             : static const char __pyx_k_O[] = "O";
    3353             : static const char __pyx_k_a[] = "a";
    3354             : static const char __pyx_k_c[] = "c";
    3355             : static const char __pyx_k_d[] = "d";
    3356             : static const char __pyx_k_f[] = "f";
    3357             : static const char __pyx_k_u[] = "u";
    3358             : static const char __pyx_k__2[] = ".";
    3359             : static const char __pyx_k__3[] = "*";
    3360             : static const char __pyx_k__6[] = "'";
    3361             : static const char __pyx_k__7[] = ")";
    3362             : static const char __pyx_k_gc[] = "gc";
    3363             : static const char __pyx_k_id[] = "id";
    3364             : static const char __pyx_k__74[] = "?";
    3365             : static const char __pyx_k_abc[] = "abc";
    3366             : static const char __pyx_k_and[] = " and ";
    3367             : static const char __pyx_k_got[] = " (got ";
    3368             : static const char __pyx_k_new[] = "__new__";
    3369             : static const char __pyx_k_obj[] = "obj";
    3370             : static const char __pyx_k_piv[] = "piv";
    3371             : static const char __pyx_k_sys[] = "sys";
    3372             : static const char __pyx_k_base[] = "base";
    3373             : static const char __pyx_k_char[] = "char";
    3374             : static const char __pyx_k_dict[] = "__dict__";
    3375             : static const char __pyx_k_main[] = "__main__";
    3376             : static const char __pyx_k_mode[] = "mode";
    3377             : static const char __pyx_k_name[] = "name";
    3378             : static const char __pyx_k_ndim[] = "ndim";
    3379             : static const char __pyx_k_pack[] = "pack";
    3380             : static const char __pyx_k_size[] = "size";
    3381             : static const char __pyx_k_spec[] = "__spec__";
    3382             : static const char __pyx_k_step[] = "step";
    3383             : static const char __pyx_k_stop[] = "stop";
    3384             : static const char __pyx_k_test[] = "__test__";
    3385             : static const char __pyx_k_ASCII[] = "ASCII";
    3386             : static const char __pyx_k_class[] = "__class__";
    3387             : static const char __pyx_k_count[] = "count";
    3388             : static const char __pyx_k_dtype[] = "dtype";
    3389             : static const char __pyx_k_error[] = "error";
    3390             : static const char __pyx_k_flags[] = "flags";
    3391             : static const char __pyx_k_index[] = "index";
    3392             : static const char __pyx_k_range[] = "range";
    3393             : static const char __pyx_k_shape[] = "shape";
    3394             : static const char __pyx_k_start[] = "start";
    3395             : static const char __pyx_k_enable[] = "enable";
    3396             : static const char __pyx_k_encode[] = "encode";
    3397             : static const char __pyx_k_format[] = "format";
    3398             : static const char __pyx_k_import[] = "__import__";
    3399             : static const char __pyx_k_name_2[] = "__name__";
    3400             : static const char __pyx_k_pickle[] = "pickle";
    3401             : static const char __pyx_k_reduce[] = "__reduce__";
    3402             : static const char __pyx_k_struct[] = "struct";
    3403             : static const char __pyx_k_unpack[] = "unpack";
    3404             : static const char __pyx_k_update[] = "update";
    3405             : static const char __pyx_k_disable[] = "disable";
    3406             : static const char __pyx_k_fortran[] = "fortran";
    3407             : static const char __pyx_k_memview[] = "memview";
    3408             : static const char __pyx_k_Ellipsis[] = "Ellipsis";
    3409             : static const char __pyx_k_Sequence[] = "Sequence";
    3410             : static const char __pyx_k_getstate[] = "__getstate__";
    3411             : static const char __pyx_k_itemsize[] = "itemsize";
    3412             : static const char __pyx_k_pyx_type[] = "__pyx_type";
    3413             : static const char __pyx_k_register[] = "register";
    3414             : static const char __pyx_k_setstate[] = "__setstate__";
    3415             : static const char __pyx_k_TypeError[] = "TypeError";
    3416             : static const char __pyx_k_enumerate[] = "enumerate";
    3417             : static const char __pyx_k_isenabled[] = "isenabled";
    3418             : static const char __pyx_k_permute_l[] = "permute_l";
    3419             : static const char __pyx_k_pyx_state[] = "__pyx_state";
    3420             : static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
    3421             : static const char __pyx_k_IndexError[] = "IndexError";
    3422             : static const char __pyx_k_ValueError[] = "ValueError";
    3423             : static const char __pyx_k_pyx_result[] = "__pyx_result";
    3424             : static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
    3425             : static const char __pyx_k_ImportError[] = "ImportError";
    3426             : static const char __pyx_k_MemoryError[] = "MemoryError";
    3427             : static const char __pyx_k_PickleError[] = "PickleError";
    3428             : static const char __pyx_k_collections[] = "collections";
    3429             : static const char __pyx_k_initializing[] = "_initializing";
    3430             : static const char __pyx_k_is_coroutine[] = "_is_coroutine";
    3431             : static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
    3432             : static const char __pyx_k_stringsource[] = "<stringsource>";
    3433             : static const char __pyx_k_th_parameter[] = "-th parameter.";
    3434             : static const char __pyx_k_version_info[] = "version_info";
    3435             : static const char __pyx_k_class_getitem[] = "__class_getitem__";
    3436             : static const char __pyx_k_lu_dispatcher[] = "lu_dispatcher";
    3437             : static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
    3438             : static const char __pyx_k_AssertionError[] = "AssertionError";
    3439             : static const char __pyx_k_View_MemoryView[] = "View.MemoryView";
    3440             : static const char __pyx_k_allocate_buffer[] = "allocate_buffer";
    3441             : static const char __pyx_k_collections_abc[] = "collections.abc";
    3442             : static const char __pyx_k_dtype_is_object[] = "dtype_is_object";
    3443             : static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
    3444             : static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
    3445             : static const char __pyx_k_pyx_unpickle_Enum[] = "__pyx_unpickle_Enum";
    3446             : static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines";
    3447             : static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
    3448             : static const char __pyx_k_strided_and_direct[] = "<strided and direct>";
    3449             : static const char __pyx_k_strided_and_indirect[] = "<strided and indirect>";
    3450             : static const char __pyx_k_Invalid_shape_in_axis[] = "Invalid shape in axis ";
    3451             : static const char __pyx_k_contiguous_and_direct[] = "<contiguous and direct>";
    3452             : static const char __pyx_k_Cannot_index_with_type[] = "Cannot index with type '";
    3453             : static const char __pyx_k_MemoryView_of_r_object[] = "<MemoryView of %r object>";
    3454             : static const char __pyx_k_MemoryView_of_r_at_0x_x[] = "<MemoryView of %r at 0x%x>";
    3455             : static const char __pyx_k_contiguous_and_indirect[] = "<contiguous and indirect>";
    3456             : static const char __pyx_k_Dimension_d_is_not_direct[] = "Dimension %d is not direct";
    3457             : static const char __pyx_k_Index_out_of_bounds_axis_d[] = "Index out of bounds (axis %d)";
    3458             : static const char __pyx_k_Step_may_not_be_zero_axis_d[] = "Step may not be zero (axis %d)";
    3459             : static const char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.array";
    3460             : static const char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data.";
    3461             : static const char __pyx_k_scipy_linalg__decomp_lu_cython[] = "scipy.linalg._decomp_lu_cython";
    3462             : static const char __pyx_k_strided_and_direct_or_indirect[] = "<strided and direct or indirect>";
    3463             : static const char __pyx_k_home_czgdp18079_Quansight_scipy[] = "/home/czgdp18079/Quansight/scipy/scipy/linalg/_decomp_lu_cython.pyx";
    3464             : static const char __pyx_k_scipy_linalg_lu_has_encountered[] = "scipy.linalg.lu has encountered an internal error in ?getrf routine with invalid value at ";
    3465             : static const char __pyx_k_All_dimensions_preceding_dimensi[] = "All dimensions preceding dimension %d must be indexed and not sliced";
    3466             : static const char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides";
    3467             : static const char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory.";
    3468             : static const char __pyx_k_Cannot_assign_to_read_only_memor[] = "Cannot assign to read-only memoryview";
    3469             : static const char __pyx_k_Cannot_create_writable_memory_vi[] = "Cannot create writable memory view from read-only memoryview";
    3470             : static const char __pyx_k_Cannot_transpose_memoryview_with[] = "Cannot transpose memoryview with indirect dimensions";
    3471             : static const char __pyx_k_Empty_shape_tuple_for_cython_arr[] = "Empty shape tuple for cython.array";
    3472             : static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))";
    3473             : static const char __pyx_k_Indirect_dimensions_not_supporte[] = "Indirect dimensions not supported";
    3474             : static const char __pyx_k_Invalid_mode_expected_c_or_fortr[] = "Invalid mode, expected 'c' or 'fortran', got ";
    3475             : static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on buffer access (axis ";
    3476             : static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object";
    3477             : static const char __pyx_k_Unsupported_type_given_to_lu_dis[] = "Unsupported type given to lu_dispatcher";
    3478             : static const char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension ";
    3479             : static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
    3480             : static const char __pyx_k_numpy__core_multiarray_failed_to[] = "numpy._core.multiarray failed to import";
    3481             : static const char __pyx_k_numpy__core_umath_failed_to_impo[] = "numpy._core.umath failed to import";
    3482             : static const char __pyx_k_scipy_linalg_lu_failed_to_alloca[] = "scipy.linalg.lu failed to allocate required memory.";
    3483             : static const char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides.";
    3484             : /* #### Code section: decls ### */
    3485             : static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer); /* proto */
    3486             : static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
    3487             : static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */
    3488             : static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */
    3489             : static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */
    3490             : static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */
    3491             : static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
    3492             : static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /* proto */
    3493             : static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */
    3494             : static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
    3495             : static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
    3496             : static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
    3497             : static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
    3498             : static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
    3499             : static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object); /* proto */
    3500             : static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3501             : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
    3502             : static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */
    3503             : static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
    3504             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3505             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3506             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3507             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3508             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3509             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3510             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3511             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3512             : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3513             : static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3514             : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3515             : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3516             : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3517             : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3518             : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3519             : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3520             : static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
    3521             : static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
    3522             : static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
    3523             : static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
    3524             : static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
    3525             : static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
    3526             : static PyObject *__pyx_pf_5scipy_6linalg_17_decomp_lu_cython_lu_dispatcher(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_u, PyObject *__pyx_v_piv, PyObject *__pyx_v_permute_l); /* proto */
    3527             : static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
    3528             : static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
    3529             : static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
    3530             : static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
    3531             : /* #### Code section: late_includes ### */
    3532             : /* #### Code section: module_state ### */
    3533             : typedef struct {
    3534             :   PyObject *__pyx_d;
    3535             :   PyObject *__pyx_b;
    3536             :   PyObject *__pyx_cython_runtime;
    3537             :   PyObject *__pyx_empty_tuple;
    3538             :   PyObject *__pyx_empty_bytes;
    3539             :   PyObject *__pyx_empty_unicode;
    3540             :   #ifdef __Pyx_CyFunction_USED
    3541             :   PyTypeObject *__pyx_CyFunctionType;
    3542             :   #endif
    3543             :   #ifdef __Pyx_FusedFunction_USED
    3544             :   PyTypeObject *__pyx_FusedFunctionType;
    3545             :   #endif
    3546             :   #ifdef __Pyx_Generator_USED
    3547             :   PyTypeObject *__pyx_GeneratorType;
    3548             :   #endif
    3549             :   #ifdef __Pyx_IterableCoroutine_USED
    3550             :   PyTypeObject *__pyx_IterableCoroutineType;
    3551             :   #endif
    3552             :   #ifdef __Pyx_Coroutine_USED
    3553             :   PyTypeObject *__pyx_CoroutineAwaitType;
    3554             :   #endif
    3555             :   #ifdef __Pyx_Coroutine_USED
    3556             :   PyTypeObject *__pyx_CoroutineType;
    3557             :   #endif
    3558             :   #if CYTHON_USE_MODULE_STATE
    3559             :   #endif
    3560             :   #if CYTHON_USE_MODULE_STATE
    3561             :   #endif
    3562             :   #if CYTHON_USE_MODULE_STATE
    3563             :   #endif
    3564             :   #if CYTHON_USE_MODULE_STATE
    3565             :   #endif
    3566             :   #if CYTHON_USE_MODULE_STATE
    3567             :   #endif
    3568             :   #if CYTHON_USE_MODULE_STATE
    3569             :   #endif
    3570             :   #if CYTHON_USE_MODULE_STATE
    3571             :   #endif
    3572             :   #if CYTHON_USE_MODULE_STATE
    3573             :   #endif
    3574             :   #if CYTHON_USE_MODULE_STATE
    3575             :   #endif
    3576             :   PyTypeObject *__pyx_ptype_7cpython_4type_type;
    3577             :   #if CYTHON_USE_MODULE_STATE
    3578             :   #endif
    3579             :   #if CYTHON_USE_MODULE_STATE
    3580             :   #endif
    3581             :   #if CYTHON_USE_MODULE_STATE
    3582             :   #endif
    3583             :   #if CYTHON_USE_MODULE_STATE
    3584             :   #endif
    3585             :   #if CYTHON_USE_MODULE_STATE
    3586             :   #endif
    3587             :   PyTypeObject *__pyx_ptype_5numpy_dtype;
    3588             :   PyTypeObject *__pyx_ptype_5numpy_flatiter;
    3589             :   PyTypeObject *__pyx_ptype_5numpy_broadcast;
    3590             :   PyTypeObject *__pyx_ptype_5numpy_ndarray;
    3591             :   PyTypeObject *__pyx_ptype_5numpy_generic;
    3592             :   PyTypeObject *__pyx_ptype_5numpy_number;
    3593             :   PyTypeObject *__pyx_ptype_5numpy_integer;
    3594             :   PyTypeObject *__pyx_ptype_5numpy_signedinteger;
    3595             :   PyTypeObject *__pyx_ptype_5numpy_unsignedinteger;
    3596             :   PyTypeObject *__pyx_ptype_5numpy_inexact;
    3597             :   PyTypeObject *__pyx_ptype_5numpy_floating;
    3598             :   PyTypeObject *__pyx_ptype_5numpy_complexfloating;
    3599             :   PyTypeObject *__pyx_ptype_5numpy_flexible;
    3600             :   PyTypeObject *__pyx_ptype_5numpy_character;
    3601             :   PyTypeObject *__pyx_ptype_5numpy_ufunc;
    3602             :   #if CYTHON_USE_MODULE_STATE
    3603             :   #endif
    3604             :   #if CYTHON_USE_MODULE_STATE
    3605             :   PyObject *__pyx_type___pyx_array;
    3606             :   PyObject *__pyx_type___pyx_MemviewEnum;
    3607             :   PyObject *__pyx_type___pyx_memoryview;
    3608             :   PyObject *__pyx_type___pyx_memoryviewslice;
    3609             :   #endif
    3610             :   PyTypeObject *__pyx_array_type;
    3611             :   PyTypeObject *__pyx_MemviewEnum_type;
    3612             :   PyTypeObject *__pyx_memoryview_type;
    3613             :   PyTypeObject *__pyx_memoryviewslice_type;
    3614             :   PyObject *__pyx_kp_u_;
    3615             :   PyObject *__pyx_n_s_ASCII;
    3616             :   PyObject *__pyx_kp_s_All_dimensions_preceding_dimensi;
    3617             :   PyObject *__pyx_n_s_AssertionError;
    3618             :   PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri;
    3619             :   PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is;
    3620             :   PyObject *__pyx_kp_s_Cannot_assign_to_read_only_memor;
    3621             :   PyObject *__pyx_kp_s_Cannot_create_writable_memory_vi;
    3622             :   PyObject *__pyx_kp_u_Cannot_index_with_type;
    3623             :   PyObject *__pyx_kp_s_Cannot_transpose_memoryview_with;
    3624             :   PyObject *__pyx_n_u_D;
    3625             :   PyObject *__pyx_kp_s_Dimension_d_is_not_direct;
    3626             :   PyObject *__pyx_n_s_Ellipsis;
    3627             :   PyObject *__pyx_kp_s_Empty_shape_tuple_for_cython_arr;
    3628             :   PyObject *__pyx_n_u_F;
    3629             :   PyObject *__pyx_n_s_ImportError;
    3630             :   PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
    3631             :   PyObject *__pyx_n_s_IndexError;
    3632             :   PyObject *__pyx_kp_s_Index_out_of_bounds_axis_d;
    3633             :   PyObject *__pyx_kp_s_Indirect_dimensions_not_supporte;
    3634             :   PyObject *__pyx_kp_u_Invalid_mode_expected_c_or_fortr;
    3635             :   PyObject *__pyx_kp_u_Invalid_shape_in_axis;
    3636             :   PyObject *__pyx_n_s_MemoryError;
    3637             :   PyObject *__pyx_kp_s_MemoryView_of_r_at_0x_x;
    3638             :   PyObject *__pyx_kp_s_MemoryView_of_r_object;
    3639             :   PyObject *__pyx_n_b_O;
    3640             :   PyObject *__pyx_kp_u_Out_of_bounds_on_buffer_access_a;
    3641             :   PyObject *__pyx_n_s_PickleError;
    3642             :   PyObject *__pyx_n_s_Sequence;
    3643             :   PyObject *__pyx_kp_s_Step_may_not_be_zero_axis_d;
    3644             :   PyObject *__pyx_n_s_TypeError;
    3645             :   PyObject *__pyx_kp_s_Unable_to_convert_item_to_object;
    3646             :   PyObject *__pyx_kp_u_Unsupported_type_given_to_lu_dis;
    3647             :   PyObject *__pyx_n_s_ValueError;
    3648             :   PyObject *__pyx_n_s_View_MemoryView;
    3649             :   PyObject *__pyx_kp_u__2;
    3650             :   PyObject *__pyx_n_s__3;
    3651             :   PyObject *__pyx_kp_u__6;
    3652             :   PyObject *__pyx_kp_u__7;
    3653             :   PyObject *__pyx_n_s__74;
    3654             :   PyObject *__pyx_n_s_a;
    3655             :   PyObject *__pyx_n_s_abc;
    3656             :   PyObject *__pyx_n_s_allocate_buffer;
    3657             :   PyObject *__pyx_kp_u_and;
    3658             :   PyObject *__pyx_n_s_asyncio_coroutines;
    3659             :   PyObject *__pyx_n_s_base;
    3660             :   PyObject *__pyx_n_s_c;
    3661             :   PyObject *__pyx_n_u_c;
    3662             :   PyObject *__pyx_n_s_char;
    3663             :   PyObject *__pyx_n_s_class;
    3664             :   PyObject *__pyx_n_s_class_getitem;
    3665             :   PyObject *__pyx_n_s_cline_in_traceback;
    3666             :   PyObject *__pyx_n_s_collections;
    3667             :   PyObject *__pyx_kp_s_collections_abc;
    3668             :   PyObject *__pyx_kp_s_contiguous_and_direct;
    3669             :   PyObject *__pyx_kp_s_contiguous_and_indirect;
    3670             :   PyObject *__pyx_n_s_count;
    3671             :   PyObject *__pyx_n_u_d;
    3672             :   PyObject *__pyx_n_s_dict;
    3673             :   PyObject *__pyx_kp_u_disable;
    3674             :   PyObject *__pyx_n_s_dtype;
    3675             :   PyObject *__pyx_n_s_dtype_is_object;
    3676             :   PyObject *__pyx_kp_u_enable;
    3677             :   PyObject *__pyx_n_s_encode;
    3678             :   PyObject *__pyx_n_s_enumerate;
    3679             :   PyObject *__pyx_n_s_error;
    3680             :   PyObject *__pyx_n_u_f;
    3681             :   PyObject *__pyx_n_s_flags;
    3682             :   PyObject *__pyx_n_s_format;
    3683             :   PyObject *__pyx_n_s_fortran;
    3684             :   PyObject *__pyx_n_u_fortran;
    3685             :   PyObject *__pyx_kp_u_gc;
    3686             :   PyObject *__pyx_n_s_getstate;
    3687             :   PyObject *__pyx_kp_u_got;
    3688             :   PyObject *__pyx_kp_u_got_differing_extents_in_dimensi;
    3689             :   PyObject *__pyx_kp_s_home_czgdp18079_Quansight_scipy;
    3690             :   PyObject *__pyx_n_s_id;
    3691             :   PyObject *__pyx_n_s_import;
    3692             :   PyObject *__pyx_n_s_index;
    3693             :   PyObject *__pyx_n_s_initializing;
    3694             :   PyObject *__pyx_n_s_is_coroutine;
    3695             :   PyObject *__pyx_kp_u_isenabled;
    3696             :   PyObject *__pyx_n_s_itemsize;
    3697             :   PyObject *__pyx_kp_s_itemsize_0_for_cython_array;
    3698             :   PyObject *__pyx_n_s_lu_dispatcher;
    3699             :   PyObject *__pyx_n_s_main;
    3700             :   PyObject *__pyx_n_s_memview;
    3701             :   PyObject *__pyx_n_s_mode;
    3702             :   PyObject *__pyx_n_s_name;
    3703             :   PyObject *__pyx_n_s_name_2;
    3704             :   PyObject *__pyx_n_s_ndim;
    3705             :   PyObject *__pyx_n_s_new;
    3706             :   PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
    3707             :   PyObject *__pyx_kp_u_numpy__core_multiarray_failed_to;
    3708             :   PyObject *__pyx_kp_u_numpy__core_umath_failed_to_impo;
    3709             :   PyObject *__pyx_n_s_obj;
    3710             :   PyObject *__pyx_n_s_pack;
    3711             :   PyObject *__pyx_n_s_permute_l;
    3712             :   PyObject *__pyx_n_s_pickle;
    3713             :   PyObject *__pyx_n_s_piv;
    3714             :   PyObject *__pyx_n_s_pyx_PickleError;
    3715             :   PyObject *__pyx_n_s_pyx_checksum;
    3716             :   PyObject *__pyx_n_s_pyx_result;
    3717             :   PyObject *__pyx_n_s_pyx_state;
    3718             :   PyObject *__pyx_n_s_pyx_type;
    3719             :   PyObject *__pyx_n_s_pyx_unpickle_Enum;
    3720             :   PyObject *__pyx_n_s_pyx_vtable;
    3721             :   PyObject *__pyx_n_s_range;
    3722             :   PyObject *__pyx_n_s_reduce;
    3723             :   PyObject *__pyx_n_s_reduce_cython;
    3724             :   PyObject *__pyx_n_s_reduce_ex;
    3725             :   PyObject *__pyx_n_s_register;
    3726             :   PyObject *__pyx_n_s_scipy_linalg__decomp_lu_cython;
    3727             :   PyObject *__pyx_kp_u_scipy_linalg_lu_failed_to_alloca;
    3728             :   PyObject *__pyx_kp_u_scipy_linalg_lu_has_encountered;
    3729             :   PyObject *__pyx_n_s_setstate;
    3730             :   PyObject *__pyx_n_s_setstate_cython;
    3731             :   PyObject *__pyx_n_s_shape;
    3732             :   PyObject *__pyx_n_s_size;
    3733             :   PyObject *__pyx_n_s_spec;
    3734             :   PyObject *__pyx_n_s_start;
    3735             :   PyObject *__pyx_n_s_step;
    3736             :   PyObject *__pyx_n_s_stop;
    3737             :   PyObject *__pyx_kp_s_strided_and_direct;
    3738             :   PyObject *__pyx_kp_s_strided_and_direct_or_indirect;
    3739             :   PyObject *__pyx_kp_s_strided_and_indirect;
    3740             :   PyObject *__pyx_kp_s_stringsource;
    3741             :   PyObject *__pyx_n_s_struct;
    3742             :   PyObject *__pyx_n_s_sys;
    3743             :   PyObject *__pyx_n_s_test;
    3744             :   PyObject *__pyx_kp_u_th_parameter;
    3745             :   PyObject *__pyx_n_s_u;
    3746             :   PyObject *__pyx_kp_s_unable_to_allocate_array_data;
    3747             :   PyObject *__pyx_kp_s_unable_to_allocate_shape_and_str;
    3748             :   PyObject *__pyx_n_s_unpack;
    3749             :   PyObject *__pyx_n_s_update;
    3750             :   PyObject *__pyx_n_s_version_info;
    3751             :   PyObject *__pyx_int_0;
    3752             :   PyObject *__pyx_int_1;
    3753             :   PyObject *__pyx_int_3;
    3754             :   PyObject *__pyx_int_112105877;
    3755             :   PyObject *__pyx_int_136983863;
    3756             :   PyObject *__pyx_int_184977713;
    3757             :   PyObject *__pyx_int_neg_1;
    3758             :   PyObject *__pyx_slice__5;
    3759             :   PyObject *__pyx_tuple__4;
    3760             :   PyObject *__pyx_tuple__8;
    3761             :   PyObject *__pyx_tuple__9;
    3762             :   PyObject *__pyx_slice__12;
    3763             :   PyObject *__pyx_slice__13;
    3764             :   PyObject *__pyx_slice__15;
    3765             :   PyObject *__pyx_slice__16;
    3766             :   PyObject *__pyx_slice__18;
    3767             :   PyObject *__pyx_slice__19;
    3768             :   PyObject *__pyx_slice__20;
    3769             :   PyObject *__pyx_slice__21;
    3770             :   PyObject *__pyx_slice__23;
    3771             :   PyObject *__pyx_slice__24;
    3772             :   PyObject *__pyx_slice__25;
    3773             :   PyObject *__pyx_slice__27;
    3774             :   PyObject *__pyx_slice__28;
    3775             :   PyObject *__pyx_slice__30;
    3776             :   PyObject *__pyx_slice__31;
    3777             :   PyObject *__pyx_slice__32;
    3778             :   PyObject *__pyx_slice__33;
    3779             :   PyObject *__pyx_slice__35;
    3780             :   PyObject *__pyx_slice__36;
    3781             :   PyObject *__pyx_slice__37;
    3782             :   PyObject *__pyx_slice__39;
    3783             :   PyObject *__pyx_slice__40;
    3784             :   PyObject *__pyx_slice__42;
    3785             :   PyObject *__pyx_slice__43;
    3786             :   PyObject *__pyx_slice__44;
    3787             :   PyObject *__pyx_slice__45;
    3788             :   PyObject *__pyx_slice__47;
    3789             :   PyObject *__pyx_slice__48;
    3790             :   PyObject *__pyx_slice__49;
    3791             :   PyObject *__pyx_slice__51;
    3792             :   PyObject *__pyx_slice__52;
    3793             :   PyObject *__pyx_slice__54;
    3794             :   PyObject *__pyx_slice__55;
    3795             :   PyObject *__pyx_slice__56;
    3796             :   PyObject *__pyx_slice__57;
    3797             :   PyObject *__pyx_slice__59;
    3798             :   PyObject *__pyx_tuple__10;
    3799             :   PyObject *__pyx_tuple__11;
    3800             :   PyObject *__pyx_tuple__14;
    3801             :   PyObject *__pyx_tuple__17;
    3802             :   PyObject *__pyx_tuple__22;
    3803             :   PyObject *__pyx_tuple__26;
    3804             :   PyObject *__pyx_tuple__29;
    3805             :   PyObject *__pyx_tuple__34;
    3806             :   PyObject *__pyx_tuple__38;
    3807             :   PyObject *__pyx_tuple__41;
    3808             :   PyObject *__pyx_tuple__46;
    3809             :   PyObject *__pyx_tuple__50;
    3810             :   PyObject *__pyx_tuple__53;
    3811             :   PyObject *__pyx_tuple__58;
    3812             :   PyObject *__pyx_tuple__60;
    3813             :   PyObject *__pyx_tuple__61;
    3814             :   PyObject *__pyx_tuple__62;
    3815             :   PyObject *__pyx_tuple__63;
    3816             :   PyObject *__pyx_tuple__64;
    3817             :   PyObject *__pyx_tuple__65;
    3818             :   PyObject *__pyx_tuple__66;
    3819             :   PyObject *__pyx_tuple__67;
    3820             :   PyObject *__pyx_tuple__68;
    3821             :   PyObject *__pyx_tuple__69;
    3822             :   PyObject *__pyx_tuple__70;
    3823             :   PyObject *__pyx_tuple__72;
    3824             :   PyObject *__pyx_codeobj__71;
    3825             :   PyObject *__pyx_codeobj__73;
    3826             : } __pyx_mstate;
    3827             : 
    3828             : #if CYTHON_USE_MODULE_STATE
    3829             : #ifdef __cplusplus
    3830             : namespace {
    3831             :   extern struct PyModuleDef __pyx_moduledef;
    3832             : } /* anonymous namespace */
    3833             : #else
    3834             : static struct PyModuleDef __pyx_moduledef;
    3835             : #endif
    3836             : 
    3837             : #define __pyx_mstate(o) ((__pyx_mstate *)__Pyx_PyModule_GetState(o))
    3838             : 
    3839             : #define __pyx_mstate_global (__pyx_mstate(PyState_FindModule(&__pyx_moduledef)))
    3840             : 
    3841             : #define __pyx_m (PyState_FindModule(&__pyx_moduledef))
    3842             : #else
    3843             : static __pyx_mstate __pyx_mstate_global_static =
    3844             : #ifdef __cplusplus
    3845             :     {};
    3846             : #else
    3847             :     {0};
    3848             : #endif
    3849             : static __pyx_mstate *__pyx_mstate_global = &__pyx_mstate_global_static;
    3850             : #endif
    3851             : /* #### Code section: module_state_clear ### */
    3852             : #if CYTHON_USE_MODULE_STATE
    3853             : static int __pyx_m_clear(PyObject *m) {
    3854             :   __pyx_mstate *clear_module_state = __pyx_mstate(m);
    3855             :   if (!clear_module_state) return 0;
    3856             :   Py_CLEAR(clear_module_state->__pyx_d);
    3857             :   Py_CLEAR(clear_module_state->__pyx_b);
    3858             :   Py_CLEAR(clear_module_state->__pyx_cython_runtime);
    3859             :   Py_CLEAR(clear_module_state->__pyx_empty_tuple);
    3860             :   Py_CLEAR(clear_module_state->__pyx_empty_bytes);
    3861             :   Py_CLEAR(clear_module_state->__pyx_empty_unicode);
    3862             :   #ifdef __Pyx_CyFunction_USED
    3863             :   Py_CLEAR(clear_module_state->__pyx_CyFunctionType);
    3864             :   #endif
    3865             :   #ifdef __Pyx_FusedFunction_USED
    3866             :   Py_CLEAR(clear_module_state->__pyx_FusedFunctionType);
    3867             :   #endif
    3868             :   Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type);
    3869             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_dtype);
    3870             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_flatiter);
    3871             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_broadcast);
    3872             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_ndarray);
    3873             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_generic);
    3874             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_number);
    3875             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_integer);
    3876             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_signedinteger);
    3877             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_unsignedinteger);
    3878             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_inexact);
    3879             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_floating);
    3880             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_complexfloating);
    3881             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_flexible);
    3882             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_character);
    3883             :   Py_CLEAR(clear_module_state->__pyx_ptype_5numpy_ufunc);
    3884             :   Py_CLEAR(clear_module_state->__pyx_array_type);
    3885             :   Py_CLEAR(clear_module_state->__pyx_type___pyx_array);
    3886             :   Py_CLEAR(clear_module_state->__pyx_MemviewEnum_type);
    3887             :   Py_CLEAR(clear_module_state->__pyx_type___pyx_MemviewEnum);
    3888             :   Py_CLEAR(clear_module_state->__pyx_memoryview_type);
    3889             :   Py_CLEAR(clear_module_state->__pyx_type___pyx_memoryview);
    3890             :   Py_CLEAR(clear_module_state->__pyx_memoryviewslice_type);
    3891             :   Py_CLEAR(clear_module_state->__pyx_type___pyx_memoryviewslice);
    3892             :   Py_CLEAR(clear_module_state->__pyx_kp_u_);
    3893             :   Py_CLEAR(clear_module_state->__pyx_n_s_ASCII);
    3894             :   Py_CLEAR(clear_module_state->__pyx_kp_s_All_dimensions_preceding_dimensi);
    3895             :   Py_CLEAR(clear_module_state->__pyx_n_s_AssertionError);
    3896             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Buffer_view_does_not_expose_stri);
    3897             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Can_only_create_a_buffer_that_is);
    3898             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Cannot_assign_to_read_only_memor);
    3899             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Cannot_create_writable_memory_vi);
    3900             :   Py_CLEAR(clear_module_state->__pyx_kp_u_Cannot_index_with_type);
    3901             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Cannot_transpose_memoryview_with);
    3902             :   Py_CLEAR(clear_module_state->__pyx_n_u_D);
    3903             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Dimension_d_is_not_direct);
    3904             :   Py_CLEAR(clear_module_state->__pyx_n_s_Ellipsis);
    3905             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Empty_shape_tuple_for_cython_arr);
    3906             :   Py_CLEAR(clear_module_state->__pyx_n_u_F);
    3907             :   Py_CLEAR(clear_module_state->__pyx_n_s_ImportError);
    3908             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0);
    3909             :   Py_CLEAR(clear_module_state->__pyx_n_s_IndexError);
    3910             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Index_out_of_bounds_axis_d);
    3911             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Indirect_dimensions_not_supporte);
    3912             :   Py_CLEAR(clear_module_state->__pyx_kp_u_Invalid_mode_expected_c_or_fortr);
    3913             :   Py_CLEAR(clear_module_state->__pyx_kp_u_Invalid_shape_in_axis);
    3914             :   Py_CLEAR(clear_module_state->__pyx_n_s_MemoryError);
    3915             :   Py_CLEAR(clear_module_state->__pyx_kp_s_MemoryView_of_r_at_0x_x);
    3916             :   Py_CLEAR(clear_module_state->__pyx_kp_s_MemoryView_of_r_object);
    3917             :   Py_CLEAR(clear_module_state->__pyx_n_b_O);
    3918             :   Py_CLEAR(clear_module_state->__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
    3919             :   Py_CLEAR(clear_module_state->__pyx_n_s_PickleError);
    3920             :   Py_CLEAR(clear_module_state->__pyx_n_s_Sequence);
    3921             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Step_may_not_be_zero_axis_d);
    3922             :   Py_CLEAR(clear_module_state->__pyx_n_s_TypeError);
    3923             :   Py_CLEAR(clear_module_state->__pyx_kp_s_Unable_to_convert_item_to_object);
    3924             :   Py_CLEAR(clear_module_state->__pyx_kp_u_Unsupported_type_given_to_lu_dis);
    3925             :   Py_CLEAR(clear_module_state->__pyx_n_s_ValueError);
    3926             :   Py_CLEAR(clear_module_state->__pyx_n_s_View_MemoryView);
    3927             :   Py_CLEAR(clear_module_state->__pyx_kp_u__2);
    3928             :   Py_CLEAR(clear_module_state->__pyx_n_s__3);
    3929             :   Py_CLEAR(clear_module_state->__pyx_kp_u__6);
    3930             :   Py_CLEAR(clear_module_state->__pyx_kp_u__7);
    3931             :   Py_CLEAR(clear_module_state->__pyx_n_s__74);
    3932             :   Py_CLEAR(clear_module_state->__pyx_n_s_a);
    3933             :   Py_CLEAR(clear_module_state->__pyx_n_s_abc);
    3934             :   Py_CLEAR(clear_module_state->__pyx_n_s_allocate_buffer);
    3935             :   Py_CLEAR(clear_module_state->__pyx_kp_u_and);
    3936             :   Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines);
    3937             :   Py_CLEAR(clear_module_state->__pyx_n_s_base);
    3938             :   Py_CLEAR(clear_module_state->__pyx_n_s_c);
    3939             :   Py_CLEAR(clear_module_state->__pyx_n_u_c);
    3940             :   Py_CLEAR(clear_module_state->__pyx_n_s_char);
    3941             :   Py_CLEAR(clear_module_state->__pyx_n_s_class);
    3942             :   Py_CLEAR(clear_module_state->__pyx_n_s_class_getitem);
    3943             :   Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback);
    3944             :   Py_CLEAR(clear_module_state->__pyx_n_s_collections);
    3945             :   Py_CLEAR(clear_module_state->__pyx_kp_s_collections_abc);
    3946             :   Py_CLEAR(clear_module_state->__pyx_kp_s_contiguous_and_direct);
    3947             :   Py_CLEAR(clear_module_state->__pyx_kp_s_contiguous_and_indirect);
    3948             :   Py_CLEAR(clear_module_state->__pyx_n_s_count);
    3949             :   Py_CLEAR(clear_module_state->__pyx_n_u_d);
    3950             :   Py_CLEAR(clear_module_state->__pyx_n_s_dict);
    3951             :   Py_CLEAR(clear_module_state->__pyx_kp_u_disable);
    3952             :   Py_CLEAR(clear_module_state->__pyx_n_s_dtype);
    3953             :   Py_CLEAR(clear_module_state->__pyx_n_s_dtype_is_object);
    3954             :   Py_CLEAR(clear_module_state->__pyx_kp_u_enable);
    3955             :   Py_CLEAR(clear_module_state->__pyx_n_s_encode);
    3956             :   Py_CLEAR(clear_module_state->__pyx_n_s_enumerate);
    3957             :   Py_CLEAR(clear_module_state->__pyx_n_s_error);
    3958             :   Py_CLEAR(clear_module_state->__pyx_n_u_f);
    3959             :   Py_CLEAR(clear_module_state->__pyx_n_s_flags);
    3960             :   Py_CLEAR(clear_module_state->__pyx_n_s_format);
    3961             :   Py_CLEAR(clear_module_state->__pyx_n_s_fortran);
    3962             :   Py_CLEAR(clear_module_state->__pyx_n_u_fortran);
    3963             :   Py_CLEAR(clear_module_state->__pyx_kp_u_gc);
    3964             :   Py_CLEAR(clear_module_state->__pyx_n_s_getstate);
    3965             :   Py_CLEAR(clear_module_state->__pyx_kp_u_got);
    3966             :   Py_CLEAR(clear_module_state->__pyx_kp_u_got_differing_extents_in_dimensi);
    3967             :   Py_CLEAR(clear_module_state->__pyx_kp_s_home_czgdp18079_Quansight_scipy);
    3968             :   Py_CLEAR(clear_module_state->__pyx_n_s_id);
    3969             :   Py_CLEAR(clear_module_state->__pyx_n_s_import);
    3970             :   Py_CLEAR(clear_module_state->__pyx_n_s_index);
    3971             :   Py_CLEAR(clear_module_state->__pyx_n_s_initializing);
    3972             :   Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine);
    3973             :   Py_CLEAR(clear_module_state->__pyx_kp_u_isenabled);
    3974             :   Py_CLEAR(clear_module_state->__pyx_n_s_itemsize);
    3975             :   Py_CLEAR(clear_module_state->__pyx_kp_s_itemsize_0_for_cython_array);
    3976             :   Py_CLEAR(clear_module_state->__pyx_n_s_lu_dispatcher);
    3977             :   Py_CLEAR(clear_module_state->__pyx_n_s_main);
    3978             :   Py_CLEAR(clear_module_state->__pyx_n_s_memview);
    3979             :   Py_CLEAR(clear_module_state->__pyx_n_s_mode);
    3980             :   Py_CLEAR(clear_module_state->__pyx_n_s_name);
    3981             :   Py_CLEAR(clear_module_state->__pyx_n_s_name_2);
    3982             :   Py_CLEAR(clear_module_state->__pyx_n_s_ndim);
    3983             :   Py_CLEAR(clear_module_state->__pyx_n_s_new);
    3984             :   Py_CLEAR(clear_module_state->__pyx_kp_s_no_default___reduce___due_to_non);
    3985             :   Py_CLEAR(clear_module_state->__pyx_kp_u_numpy__core_multiarray_failed_to);
    3986             :   Py_CLEAR(clear_module_state->__pyx_kp_u_numpy__core_umath_failed_to_impo);
    3987             :   Py_CLEAR(clear_module_state->__pyx_n_s_obj);
    3988             :   Py_CLEAR(clear_module_state->__pyx_n_s_pack);
    3989             :   Py_CLEAR(clear_module_state->__pyx_n_s_permute_l);
    3990             :   Py_CLEAR(clear_module_state->__pyx_n_s_pickle);
    3991             :   Py_CLEAR(clear_module_state->__pyx_n_s_piv);
    3992             :   Py_CLEAR(clear_module_state->__pyx_n_s_pyx_PickleError);
    3993             :   Py_CLEAR(clear_module_state->__pyx_n_s_pyx_checksum);
    3994             :   Py_CLEAR(clear_module_state->__pyx_n_s_pyx_result);
    3995             :   Py_CLEAR(clear_module_state->__pyx_n_s_pyx_state);
    3996             :   Py_CLEAR(clear_module_state->__pyx_n_s_pyx_type);
    3997             :   Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_Enum);
    3998             :   Py_CLEAR(clear_module_state->__pyx_n_s_pyx_vtable);
    3999             :   Py_CLEAR(clear_module_state->__pyx_n_s_range);
    4000             :   Py_CLEAR(clear_module_state->__pyx_n_s_reduce);
    4001             :   Py_CLEAR(clear_module_state->__pyx_n_s_reduce_cython);
    4002             :   Py_CLEAR(clear_module_state->__pyx_n_s_reduce_ex);
    4003             :   Py_CLEAR(clear_module_state->__pyx_n_s_register);
    4004             :   Py_CLEAR(clear_module_state->__pyx_n_s_scipy_linalg__decomp_lu_cython);
    4005             :   Py_CLEAR(clear_module_state->__pyx_kp_u_scipy_linalg_lu_failed_to_alloca);
    4006             :   Py_CLEAR(clear_module_state->__pyx_kp_u_scipy_linalg_lu_has_encountered);
    4007             :   Py_CLEAR(clear_module_state->__pyx_n_s_setstate);
    4008             :   Py_CLEAR(clear_module_state->__pyx_n_s_setstate_cython);
    4009             :   Py_CLEAR(clear_module_state->__pyx_n_s_shape);
    4010             :   Py_CLEAR(clear_module_state->__pyx_n_s_size);
    4011             :   Py_CLEAR(clear_module_state->__pyx_n_s_spec);
    4012             :   Py_CLEAR(clear_module_state->__pyx_n_s_start);
    4013             :   Py_CLEAR(clear_module_state->__pyx_n_s_step);
    4014             :   Py_CLEAR(clear_module_state->__pyx_n_s_stop);
    4015             :   Py_CLEAR(clear_module_state->__pyx_kp_s_strided_and_direct);
    4016             :   Py_CLEAR(clear_module_state->__pyx_kp_s_strided_and_direct_or_indirect);
    4017             :   Py_CLEAR(clear_module_state->__pyx_kp_s_strided_and_indirect);
    4018             :   Py_CLEAR(clear_module_state->__pyx_kp_s_stringsource);
    4019             :   Py_CLEAR(clear_module_state->__pyx_n_s_struct);
    4020             :   Py_CLEAR(clear_module_state->__pyx_n_s_sys);
    4021             :   Py_CLEAR(clear_module_state->__pyx_n_s_test);
    4022             :   Py_CLEAR(clear_module_state->__pyx_kp_u_th_parameter);
    4023             :   Py_CLEAR(clear_module_state->__pyx_n_s_u);
    4024             :   Py_CLEAR(clear_module_state->__pyx_kp_s_unable_to_allocate_array_data);
    4025             :   Py_CLEAR(clear_module_state->__pyx_kp_s_unable_to_allocate_shape_and_str);
    4026             :   Py_CLEAR(clear_module_state->__pyx_n_s_unpack);
    4027             :   Py_CLEAR(clear_module_state->__pyx_n_s_update);
    4028             :   Py_CLEAR(clear_module_state->__pyx_n_s_version_info);
    4029             :   Py_CLEAR(clear_module_state->__pyx_int_0);
    4030             :   Py_CLEAR(clear_module_state->__pyx_int_1);
    4031             :   Py_CLEAR(clear_module_state->__pyx_int_3);
    4032             :   Py_CLEAR(clear_module_state->__pyx_int_112105877);
    4033             :   Py_CLEAR(clear_module_state->__pyx_int_136983863);
    4034             :   Py_CLEAR(clear_module_state->__pyx_int_184977713);
    4035             :   Py_CLEAR(clear_module_state->__pyx_int_neg_1);
    4036             :   Py_CLEAR(clear_module_state->__pyx_slice__5);
    4037             :   Py_CLEAR(clear_module_state->__pyx_tuple__4);
    4038             :   Py_CLEAR(clear_module_state->__pyx_tuple__8);
    4039             :   Py_CLEAR(clear_module_state->__pyx_tuple__9);
    4040             :   Py_CLEAR(clear_module_state->__pyx_slice__12);
    4041             :   Py_CLEAR(clear_module_state->__pyx_slice__13);
    4042             :   Py_CLEAR(clear_module_state->__pyx_slice__15);
    4043             :   Py_CLEAR(clear_module_state->__pyx_slice__16);
    4044             :   Py_CLEAR(clear_module_state->__pyx_slice__18);
    4045             :   Py_CLEAR(clear_module_state->__pyx_slice__19);
    4046             :   Py_CLEAR(clear_module_state->__pyx_slice__20);
    4047             :   Py_CLEAR(clear_module_state->__pyx_slice__21);
    4048             :   Py_CLEAR(clear_module_state->__pyx_slice__23);
    4049             :   Py_CLEAR(clear_module_state->__pyx_slice__24);
    4050             :   Py_CLEAR(clear_module_state->__pyx_slice__25);
    4051             :   Py_CLEAR(clear_module_state->__pyx_slice__27);
    4052             :   Py_CLEAR(clear_module_state->__pyx_slice__28);
    4053             :   Py_CLEAR(clear_module_state->__pyx_slice__30);
    4054             :   Py_CLEAR(clear_module_state->__pyx_slice__31);
    4055             :   Py_CLEAR(clear_module_state->__pyx_slice__32);
    4056             :   Py_CLEAR(clear_module_state->__pyx_slice__33);
    4057             :   Py_CLEAR(clear_module_state->__pyx_slice__35);
    4058             :   Py_CLEAR(clear_module_state->__pyx_slice__36);
    4059             :   Py_CLEAR(clear_module_state->__pyx_slice__37);
    4060             :   Py_CLEAR(clear_module_state->__pyx_slice__39);
    4061             :   Py_CLEAR(clear_module_state->__pyx_slice__40);
    4062             :   Py_CLEAR(clear_module_state->__pyx_slice__42);
    4063             :   Py_CLEAR(clear_module_state->__pyx_slice__43);
    4064             :   Py_CLEAR(clear_module_state->__pyx_slice__44);
    4065             :   Py_CLEAR(clear_module_state->__pyx_slice__45);
    4066             :   Py_CLEAR(clear_module_state->__pyx_slice__47);
    4067             :   Py_CLEAR(clear_module_state->__pyx_slice__48);
    4068             :   Py_CLEAR(clear_module_state->__pyx_slice__49);
    4069             :   Py_CLEAR(clear_module_state->__pyx_slice__51);
    4070             :   Py_CLEAR(clear_module_state->__pyx_slice__52);
    4071             :   Py_CLEAR(clear_module_state->__pyx_slice__54);
    4072             :   Py_CLEAR(clear_module_state->__pyx_slice__55);
    4073             :   Py_CLEAR(clear_module_state->__pyx_slice__56);
    4074             :   Py_CLEAR(clear_module_state->__pyx_slice__57);
    4075             :   Py_CLEAR(clear_module_state->__pyx_slice__59);
    4076             :   Py_CLEAR(clear_module_state->__pyx_tuple__10);
    4077             :   Py_CLEAR(clear_module_state->__pyx_tuple__11);
    4078             :   Py_CLEAR(clear_module_state->__pyx_tuple__14);
    4079             :   Py_CLEAR(clear_module_state->__pyx_tuple__17);
    4080             :   Py_CLEAR(clear_module_state->__pyx_tuple__22);
    4081             :   Py_CLEAR(clear_module_state->__pyx_tuple__26);
    4082             :   Py_CLEAR(clear_module_state->__pyx_tuple__29);
    4083             :   Py_CLEAR(clear_module_state->__pyx_tuple__34);
    4084             :   Py_CLEAR(clear_module_state->__pyx_tuple__38);
    4085             :   Py_CLEAR(clear_module_state->__pyx_tuple__41);
    4086             :   Py_CLEAR(clear_module_state->__pyx_tuple__46);
    4087             :   Py_CLEAR(clear_module_state->__pyx_tuple__50);
    4088             :   Py_CLEAR(clear_module_state->__pyx_tuple__53);
    4089             :   Py_CLEAR(clear_module_state->__pyx_tuple__58);
    4090             :   Py_CLEAR(clear_module_state->__pyx_tuple__60);
    4091             :   Py_CLEAR(clear_module_state->__pyx_tuple__61);
    4092             :   Py_CLEAR(clear_module_state->__pyx_tuple__62);
    4093             :   Py_CLEAR(clear_module_state->__pyx_tuple__63);
    4094             :   Py_CLEAR(clear_module_state->__pyx_tuple__64);
    4095             :   Py_CLEAR(clear_module_state->__pyx_tuple__65);
    4096             :   Py_CLEAR(clear_module_state->__pyx_tuple__66);
    4097             :   Py_CLEAR(clear_module_state->__pyx_tuple__67);
    4098             :   Py_CLEAR(clear_module_state->__pyx_tuple__68);
    4099             :   Py_CLEAR(clear_module_state->__pyx_tuple__69);
    4100             :   Py_CLEAR(clear_module_state->__pyx_tuple__70);
    4101             :   Py_CLEAR(clear_module_state->__pyx_tuple__72);
    4102             :   Py_CLEAR(clear_module_state->__pyx_codeobj__71);
    4103             :   Py_CLEAR(clear_module_state->__pyx_codeobj__73);
    4104             :   return 0;
    4105             : }
    4106             : #endif
    4107             : /* #### Code section: module_state_traverse ### */
    4108             : #if CYTHON_USE_MODULE_STATE
    4109             : static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
    4110             :   __pyx_mstate *traverse_module_state = __pyx_mstate(m);
    4111             :   if (!traverse_module_state) return 0;
    4112             :   Py_VISIT(traverse_module_state->__pyx_d);
    4113             :   Py_VISIT(traverse_module_state->__pyx_b);
    4114             :   Py_VISIT(traverse_module_state->__pyx_cython_runtime);
    4115             :   Py_VISIT(traverse_module_state->__pyx_empty_tuple);
    4116             :   Py_VISIT(traverse_module_state->__pyx_empty_bytes);
    4117             :   Py_VISIT(traverse_module_state->__pyx_empty_unicode);
    4118             :   #ifdef __Pyx_CyFunction_USED
    4119             :   Py_VISIT(traverse_module_state->__pyx_CyFunctionType);
    4120             :   #endif
    4121             :   #ifdef __Pyx_FusedFunction_USED
    4122             :   Py_VISIT(traverse_module_state->__pyx_FusedFunctionType);
    4123             :   #endif
    4124             :   Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type);
    4125             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_dtype);
    4126             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_flatiter);
    4127             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_broadcast);
    4128             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_ndarray);
    4129             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_generic);
    4130             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_number);
    4131             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_integer);
    4132             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_signedinteger);
    4133             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_unsignedinteger);
    4134             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_inexact);
    4135             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_floating);
    4136             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_complexfloating);
    4137             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_flexible);
    4138             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_character);
    4139             :   Py_VISIT(traverse_module_state->__pyx_ptype_5numpy_ufunc);
    4140             :   Py_VISIT(traverse_module_state->__pyx_array_type);
    4141             :   Py_VISIT(traverse_module_state->__pyx_type___pyx_array);
    4142             :   Py_VISIT(traverse_module_state->__pyx_MemviewEnum_type);
    4143             :   Py_VISIT(traverse_module_state->__pyx_type___pyx_MemviewEnum);
    4144             :   Py_VISIT(traverse_module_state->__pyx_memoryview_type);
    4145             :   Py_VISIT(traverse_module_state->__pyx_type___pyx_memoryview);
    4146             :   Py_VISIT(traverse_module_state->__pyx_memoryviewslice_type);
    4147             :   Py_VISIT(traverse_module_state->__pyx_type___pyx_memoryviewslice);
    4148             :   Py_VISIT(traverse_module_state->__pyx_kp_u_);
    4149             :   Py_VISIT(traverse_module_state->__pyx_n_s_ASCII);
    4150             :   Py_VISIT(traverse_module_state->__pyx_kp_s_All_dimensions_preceding_dimensi);
    4151             :   Py_VISIT(traverse_module_state->__pyx_n_s_AssertionError);
    4152             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Buffer_view_does_not_expose_stri);
    4153             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Can_only_create_a_buffer_that_is);
    4154             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Cannot_assign_to_read_only_memor);
    4155             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Cannot_create_writable_memory_vi);
    4156             :   Py_VISIT(traverse_module_state->__pyx_kp_u_Cannot_index_with_type);
    4157             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Cannot_transpose_memoryview_with);
    4158             :   Py_VISIT(traverse_module_state->__pyx_n_u_D);
    4159             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Dimension_d_is_not_direct);
    4160             :   Py_VISIT(traverse_module_state->__pyx_n_s_Ellipsis);
    4161             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Empty_shape_tuple_for_cython_arr);
    4162             :   Py_VISIT(traverse_module_state->__pyx_n_u_F);
    4163             :   Py_VISIT(traverse_module_state->__pyx_n_s_ImportError);
    4164             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0);
    4165             :   Py_VISIT(traverse_module_state->__pyx_n_s_IndexError);
    4166             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Index_out_of_bounds_axis_d);
    4167             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Indirect_dimensions_not_supporte);
    4168             :   Py_VISIT(traverse_module_state->__pyx_kp_u_Invalid_mode_expected_c_or_fortr);
    4169             :   Py_VISIT(traverse_module_state->__pyx_kp_u_Invalid_shape_in_axis);
    4170             :   Py_VISIT(traverse_module_state->__pyx_n_s_MemoryError);
    4171             :   Py_VISIT(traverse_module_state->__pyx_kp_s_MemoryView_of_r_at_0x_x);
    4172             :   Py_VISIT(traverse_module_state->__pyx_kp_s_MemoryView_of_r_object);
    4173             :   Py_VISIT(traverse_module_state->__pyx_n_b_O);
    4174             :   Py_VISIT(traverse_module_state->__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
    4175             :   Py_VISIT(traverse_module_state->__pyx_n_s_PickleError);
    4176             :   Py_VISIT(traverse_module_state->__pyx_n_s_Sequence);
    4177             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Step_may_not_be_zero_axis_d);
    4178             :   Py_VISIT(traverse_module_state->__pyx_n_s_TypeError);
    4179             :   Py_VISIT(traverse_module_state->__pyx_kp_s_Unable_to_convert_item_to_object);
    4180             :   Py_VISIT(traverse_module_state->__pyx_kp_u_Unsupported_type_given_to_lu_dis);
    4181             :   Py_VISIT(traverse_module_state->__pyx_n_s_ValueError);
    4182             :   Py_VISIT(traverse_module_state->__pyx_n_s_View_MemoryView);
    4183             :   Py_VISIT(traverse_module_state->__pyx_kp_u__2);
    4184             :   Py_VISIT(traverse_module_state->__pyx_n_s__3);
    4185             :   Py_VISIT(traverse_module_state->__pyx_kp_u__6);
    4186             :   Py_VISIT(traverse_module_state->__pyx_kp_u__7);
    4187             :   Py_VISIT(traverse_module_state->__pyx_n_s__74);
    4188             :   Py_VISIT(traverse_module_state->__pyx_n_s_a);
    4189             :   Py_VISIT(traverse_module_state->__pyx_n_s_abc);
    4190             :   Py_VISIT(traverse_module_state->__pyx_n_s_allocate_buffer);
    4191             :   Py_VISIT(traverse_module_state->__pyx_kp_u_and);
    4192             :   Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines);
    4193             :   Py_VISIT(traverse_module_state->__pyx_n_s_base);
    4194             :   Py_VISIT(traverse_module_state->__pyx_n_s_c);
    4195             :   Py_VISIT(traverse_module_state->__pyx_n_u_c);
    4196             :   Py_VISIT(traverse_module_state->__pyx_n_s_char);
    4197             :   Py_VISIT(traverse_module_state->__pyx_n_s_class);
    4198             :   Py_VISIT(traverse_module_state->__pyx_n_s_class_getitem);
    4199             :   Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback);
    4200             :   Py_VISIT(traverse_module_state->__pyx_n_s_collections);
    4201             :   Py_VISIT(traverse_module_state->__pyx_kp_s_collections_abc);
    4202             :   Py_VISIT(traverse_module_state->__pyx_kp_s_contiguous_and_direct);
    4203             :   Py_VISIT(traverse_module_state->__pyx_kp_s_contiguous_and_indirect);
    4204             :   Py_VISIT(traverse_module_state->__pyx_n_s_count);
    4205             :   Py_VISIT(traverse_module_state->__pyx_n_u_d);
    4206             :   Py_VISIT(traverse_module_state->__pyx_n_s_dict);
    4207             :   Py_VISIT(traverse_module_state->__pyx_kp_u_disable);
    4208             :   Py_VISIT(traverse_module_state->__pyx_n_s_dtype);
    4209             :   Py_VISIT(traverse_module_state->__pyx_n_s_dtype_is_object);
    4210             :   Py_VISIT(traverse_module_state->__pyx_kp_u_enable);
    4211             :   Py_VISIT(traverse_module_state->__pyx_n_s_encode);
    4212             :   Py_VISIT(traverse_module_state->__pyx_n_s_enumerate);
    4213             :   Py_VISIT(traverse_module_state->__pyx_n_s_error);
    4214             :   Py_VISIT(traverse_module_state->__pyx_n_u_f);
    4215             :   Py_VISIT(traverse_module_state->__pyx_n_s_flags);
    4216             :   Py_VISIT(traverse_module_state->__pyx_n_s_format);
    4217             :   Py_VISIT(traverse_module_state->__pyx_n_s_fortran);
    4218             :   Py_VISIT(traverse_module_state->__pyx_n_u_fortran);
    4219             :   Py_VISIT(traverse_module_state->__pyx_kp_u_gc);
    4220             :   Py_VISIT(traverse_module_state->__pyx_n_s_getstate);
    4221             :   Py_VISIT(traverse_module_state->__pyx_kp_u_got);
    4222             :   Py_VISIT(traverse_module_state->__pyx_kp_u_got_differing_extents_in_dimensi);
    4223             :   Py_VISIT(traverse_module_state->__pyx_kp_s_home_czgdp18079_Quansight_scipy);
    4224             :   Py_VISIT(traverse_module_state->__pyx_n_s_id);
    4225             :   Py_VISIT(traverse_module_state->__pyx_n_s_import);
    4226             :   Py_VISIT(traverse_module_state->__pyx_n_s_index);
    4227             :   Py_VISIT(traverse_module_state->__pyx_n_s_initializing);
    4228             :   Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine);
    4229             :   Py_VISIT(traverse_module_state->__pyx_kp_u_isenabled);
    4230             :   Py_VISIT(traverse_module_state->__pyx_n_s_itemsize);
    4231             :   Py_VISIT(traverse_module_state->__pyx_kp_s_itemsize_0_for_cython_array);
    4232             :   Py_VISIT(traverse_module_state->__pyx_n_s_lu_dispatcher);
    4233             :   Py_VISIT(traverse_module_state->__pyx_n_s_main);
    4234             :   Py_VISIT(traverse_module_state->__pyx_n_s_memview);
    4235             :   Py_VISIT(traverse_module_state->__pyx_n_s_mode);
    4236             :   Py_VISIT(traverse_module_state->__pyx_n_s_name);
    4237             :   Py_VISIT(traverse_module_state->__pyx_n_s_name_2);
    4238             :   Py_VISIT(traverse_module_state->__pyx_n_s_ndim);
    4239             :   Py_VISIT(traverse_module_state->__pyx_n_s_new);
    4240             :   Py_VISIT(traverse_module_state->__pyx_kp_s_no_default___reduce___due_to_non);
    4241             :   Py_VISIT(traverse_module_state->__pyx_kp_u_numpy__core_multiarray_failed_to);
    4242             :   Py_VISIT(traverse_module_state->__pyx_kp_u_numpy__core_umath_failed_to_impo);
    4243             :   Py_VISIT(traverse_module_state->__pyx_n_s_obj);
    4244             :   Py_VISIT(traverse_module_state->__pyx_n_s_pack);
    4245             :   Py_VISIT(traverse_module_state->__pyx_n_s_permute_l);
    4246             :   Py_VISIT(traverse_module_state->__pyx_n_s_pickle);
    4247             :   Py_VISIT(traverse_module_state->__pyx_n_s_piv);
    4248             :   Py_VISIT(traverse_module_state->__pyx_n_s_pyx_PickleError);
    4249             :   Py_VISIT(traverse_module_state->__pyx_n_s_pyx_checksum);
    4250             :   Py_VISIT(traverse_module_state->__pyx_n_s_pyx_result);
    4251             :   Py_VISIT(traverse_module_state->__pyx_n_s_pyx_state);
    4252             :   Py_VISIT(traverse_module_state->__pyx_n_s_pyx_type);
    4253             :   Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_Enum);
    4254             :   Py_VISIT(traverse_module_state->__pyx_n_s_pyx_vtable);
    4255             :   Py_VISIT(traverse_module_state->__pyx_n_s_range);
    4256             :   Py_VISIT(traverse_module_state->__pyx_n_s_reduce);
    4257             :   Py_VISIT(traverse_module_state->__pyx_n_s_reduce_cython);
    4258             :   Py_VISIT(traverse_module_state->__pyx_n_s_reduce_ex);
    4259             :   Py_VISIT(traverse_module_state->__pyx_n_s_register);
    4260             :   Py_VISIT(traverse_module_state->__pyx_n_s_scipy_linalg__decomp_lu_cython);
    4261             :   Py_VISIT(traverse_module_state->__pyx_kp_u_scipy_linalg_lu_failed_to_alloca);
    4262             :   Py_VISIT(traverse_module_state->__pyx_kp_u_scipy_linalg_lu_has_encountered);
    4263             :   Py_VISIT(traverse_module_state->__pyx_n_s_setstate);
    4264             :   Py_VISIT(traverse_module_state->__pyx_n_s_setstate_cython);
    4265             :   Py_VISIT(traverse_module_state->__pyx_n_s_shape);
    4266             :   Py_VISIT(traverse_module_state->__pyx_n_s_size);
    4267             :   Py_VISIT(traverse_module_state->__pyx_n_s_spec);
    4268             :   Py_VISIT(traverse_module_state->__pyx_n_s_start);
    4269             :   Py_VISIT(traverse_module_state->__pyx_n_s_step);
    4270             :   Py_VISIT(traverse_module_state->__pyx_n_s_stop);
    4271             :   Py_VISIT(traverse_module_state->__pyx_kp_s_strided_and_direct);
    4272             :   Py_VISIT(traverse_module_state->__pyx_kp_s_strided_and_direct_or_indirect);
    4273             :   Py_VISIT(traverse_module_state->__pyx_kp_s_strided_and_indirect);
    4274             :   Py_VISIT(traverse_module_state->__pyx_kp_s_stringsource);
    4275             :   Py_VISIT(traverse_module_state->__pyx_n_s_struct);
    4276             :   Py_VISIT(traverse_module_state->__pyx_n_s_sys);
    4277             :   Py_VISIT(traverse_module_state->__pyx_n_s_test);
    4278             :   Py_VISIT(traverse_module_state->__pyx_kp_u_th_parameter);
    4279             :   Py_VISIT(traverse_module_state->__pyx_n_s_u);
    4280             :   Py_VISIT(traverse_module_state->__pyx_kp_s_unable_to_allocate_array_data);
    4281             :   Py_VISIT(traverse_module_state->__pyx_kp_s_unable_to_allocate_shape_and_str);
    4282             :   Py_VISIT(traverse_module_state->__pyx_n_s_unpack);
    4283             :   Py_VISIT(traverse_module_state->__pyx_n_s_update);
    4284             :   Py_VISIT(traverse_module_state->__pyx_n_s_version_info);
    4285             :   Py_VISIT(traverse_module_state->__pyx_int_0);
    4286             :   Py_VISIT(traverse_module_state->__pyx_int_1);
    4287             :   Py_VISIT(traverse_module_state->__pyx_int_3);
    4288             :   Py_VISIT(traverse_module_state->__pyx_int_112105877);
    4289             :   Py_VISIT(traverse_module_state->__pyx_int_136983863);
    4290             :   Py_VISIT(traverse_module_state->__pyx_int_184977713);
    4291             :   Py_VISIT(traverse_module_state->__pyx_int_neg_1);
    4292             :   Py_VISIT(traverse_module_state->__pyx_slice__5);
    4293             :   Py_VISIT(traverse_module_state->__pyx_tuple__4);
    4294             :   Py_VISIT(traverse_module_state->__pyx_tuple__8);
    4295             :   Py_VISIT(traverse_module_state->__pyx_tuple__9);
    4296             :   Py_VISIT(traverse_module_state->__pyx_slice__12);
    4297             :   Py_VISIT(traverse_module_state->__pyx_slice__13);
    4298             :   Py_VISIT(traverse_module_state->__pyx_slice__15);
    4299             :   Py_VISIT(traverse_module_state->__pyx_slice__16);
    4300             :   Py_VISIT(traverse_module_state->__pyx_slice__18);
    4301             :   Py_VISIT(traverse_module_state->__pyx_slice__19);
    4302             :   Py_VISIT(traverse_module_state->__pyx_slice__20);
    4303             :   Py_VISIT(traverse_module_state->__pyx_slice__21);
    4304             :   Py_VISIT(traverse_module_state->__pyx_slice__23);
    4305             :   Py_VISIT(traverse_module_state->__pyx_slice__24);
    4306             :   Py_VISIT(traverse_module_state->__pyx_slice__25);
    4307             :   Py_VISIT(traverse_module_state->__pyx_slice__27);
    4308             :   Py_VISIT(traverse_module_state->__pyx_slice__28);
    4309             :   Py_VISIT(traverse_module_state->__pyx_slice__30);
    4310             :   Py_VISIT(traverse_module_state->__pyx_slice__31);
    4311             :   Py_VISIT(traverse_module_state->__pyx_slice__32);
    4312             :   Py_VISIT(traverse_module_state->__pyx_slice__33);
    4313             :   Py_VISIT(traverse_module_state->__pyx_slice__35);
    4314             :   Py_VISIT(traverse_module_state->__pyx_slice__36);
    4315             :   Py_VISIT(traverse_module_state->__pyx_slice__37);
    4316             :   Py_VISIT(traverse_module_state->__pyx_slice__39);
    4317             :   Py_VISIT(traverse_module_state->__pyx_slice__40);
    4318             :   Py_VISIT(traverse_module_state->__pyx_slice__42);
    4319             :   Py_VISIT(traverse_module_state->__pyx_slice__43);
    4320             :   Py_VISIT(traverse_module_state->__pyx_slice__44);
    4321             :   Py_VISIT(traverse_module_state->__pyx_slice__45);
    4322             :   Py_VISIT(traverse_module_state->__pyx_slice__47);
    4323             :   Py_VISIT(traverse_module_state->__pyx_slice__48);
    4324             :   Py_VISIT(traverse_module_state->__pyx_slice__49);
    4325             :   Py_VISIT(traverse_module_state->__pyx_slice__51);
    4326             :   Py_VISIT(traverse_module_state->__pyx_slice__52);
    4327             :   Py_VISIT(traverse_module_state->__pyx_slice__54);
    4328             :   Py_VISIT(traverse_module_state->__pyx_slice__55);
    4329             :   Py_VISIT(traverse_module_state->__pyx_slice__56);
    4330             :   Py_VISIT(traverse_module_state->__pyx_slice__57);
    4331             :   Py_VISIT(traverse_module_state->__pyx_slice__59);
    4332             :   Py_VISIT(traverse_module_state->__pyx_tuple__10);
    4333             :   Py_VISIT(traverse_module_state->__pyx_tuple__11);
    4334             :   Py_VISIT(traverse_module_state->__pyx_tuple__14);
    4335             :   Py_VISIT(traverse_module_state->__pyx_tuple__17);
    4336             :   Py_VISIT(traverse_module_state->__pyx_tuple__22);
    4337             :   Py_VISIT(traverse_module_state->__pyx_tuple__26);
    4338             :   Py_VISIT(traverse_module_state->__pyx_tuple__29);
    4339             :   Py_VISIT(traverse_module_state->__pyx_tuple__34);
    4340             :   Py_VISIT(traverse_module_state->__pyx_tuple__38);
    4341             :   Py_VISIT(traverse_module_state->__pyx_tuple__41);
    4342             :   Py_VISIT(traverse_module_state->__pyx_tuple__46);
    4343             :   Py_VISIT(traverse_module_state->__pyx_tuple__50);
    4344             :   Py_VISIT(traverse_module_state->__pyx_tuple__53);
    4345             :   Py_VISIT(traverse_module_state->__pyx_tuple__58);
    4346             :   Py_VISIT(traverse_module_state->__pyx_tuple__60);
    4347             :   Py_VISIT(traverse_module_state->__pyx_tuple__61);
    4348             :   Py_VISIT(traverse_module_state->__pyx_tuple__62);
    4349             :   Py_VISIT(traverse_module_state->__pyx_tuple__63);
    4350             :   Py_VISIT(traverse_module_state->__pyx_tuple__64);
    4351             :   Py_VISIT(traverse_module_state->__pyx_tuple__65);
    4352             :   Py_VISIT(traverse_module_state->__pyx_tuple__66);
    4353             :   Py_VISIT(traverse_module_state->__pyx_tuple__67);
    4354             :   Py_VISIT(traverse_module_state->__pyx_tuple__68);
    4355             :   Py_VISIT(traverse_module_state->__pyx_tuple__69);
    4356             :   Py_VISIT(traverse_module_state->__pyx_tuple__70);
    4357             :   Py_VISIT(traverse_module_state->__pyx_tuple__72);
    4358             :   Py_VISIT(traverse_module_state->__pyx_codeobj__71);
    4359             :   Py_VISIT(traverse_module_state->__pyx_codeobj__73);
    4360             :   return 0;
    4361             : }
    4362             : #endif
    4363             : /* #### Code section: module_state_defines ### */
    4364             : #define __pyx_d __pyx_mstate_global->__pyx_d
    4365             : #define __pyx_b __pyx_mstate_global->__pyx_b
    4366             : #define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime
    4367             : #define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple
    4368             : #define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes
    4369             : #define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode
    4370             : #ifdef __Pyx_CyFunction_USED
    4371             : #define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType
    4372             : #endif
    4373             : #ifdef __Pyx_FusedFunction_USED
    4374             : #define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType
    4375             : #endif
    4376             : #ifdef __Pyx_Generator_USED
    4377             : #define __pyx_GeneratorType __pyx_mstate_global->__pyx_GeneratorType
    4378             : #endif
    4379             : #ifdef __Pyx_IterableCoroutine_USED
    4380             : #define __pyx_IterableCoroutineType __pyx_mstate_global->__pyx_IterableCoroutineType
    4381             : #endif
    4382             : #ifdef __Pyx_Coroutine_USED
    4383             : #define __pyx_CoroutineAwaitType __pyx_mstate_global->__pyx_CoroutineAwaitType
    4384             : #endif
    4385             : #ifdef __Pyx_Coroutine_USED
    4386             : #define __pyx_CoroutineType __pyx_mstate_global->__pyx_CoroutineType
    4387             : #endif
    4388             : #if CYTHON_USE_MODULE_STATE
    4389             : #endif
    4390             : #if CYTHON_USE_MODULE_STATE
    4391             : #endif
    4392             : #if CYTHON_USE_MODULE_STATE
    4393             : #endif
    4394             : #if CYTHON_USE_MODULE_STATE
    4395             : #endif
    4396             : #if CYTHON_USE_MODULE_STATE
    4397             : #endif
    4398             : #if CYTHON_USE_MODULE_STATE
    4399             : #endif
    4400             : #if CYTHON_USE_MODULE_STATE
    4401             : #endif
    4402             : #if CYTHON_USE_MODULE_STATE
    4403             : #endif
    4404             : #if CYTHON_USE_MODULE_STATE
    4405             : #endif
    4406             : #define __pyx_ptype_7cpython_4type_type __pyx_mstate_global->__pyx_ptype_7cpython_4type_type
    4407             : #if CYTHON_USE_MODULE_STATE
    4408             : #endif
    4409             : #if CYTHON_USE_MODULE_STATE
    4410             : #endif
    4411             : #if CYTHON_USE_MODULE_STATE
    4412             : #endif
    4413             : #if CYTHON_USE_MODULE_STATE
    4414             : #endif
    4415             : #if CYTHON_USE_MODULE_STATE
    4416             : #endif
    4417             : #define __pyx_ptype_5numpy_dtype __pyx_mstate_global->__pyx_ptype_5numpy_dtype
    4418             : #define __pyx_ptype_5numpy_flatiter __pyx_mstate_global->__pyx_ptype_5numpy_flatiter
    4419             : #define __pyx_ptype_5numpy_broadcast __pyx_mstate_global->__pyx_ptype_5numpy_broadcast
    4420             : #define __pyx_ptype_5numpy_ndarray __pyx_mstate_global->__pyx_ptype_5numpy_ndarray
    4421             : #define __pyx_ptype_5numpy_generic __pyx_mstate_global->__pyx_ptype_5numpy_generic
    4422             : #define __pyx_ptype_5numpy_number __pyx_mstate_global->__pyx_ptype_5numpy_number
    4423             : #define __pyx_ptype_5numpy_integer __pyx_mstate_global->__pyx_ptype_5numpy_integer
    4424             : #define __pyx_ptype_5numpy_signedinteger __pyx_mstate_global->__pyx_ptype_5numpy_signedinteger
    4425             : #define __pyx_ptype_5numpy_unsignedinteger __pyx_mstate_global->__pyx_ptype_5numpy_unsignedinteger
    4426             : #define __pyx_ptype_5numpy_inexact __pyx_mstate_global->__pyx_ptype_5numpy_inexact
    4427             : #define __pyx_ptype_5numpy_floating __pyx_mstate_global->__pyx_ptype_5numpy_floating
    4428             : #define __pyx_ptype_5numpy_complexfloating __pyx_mstate_global->__pyx_ptype_5numpy_complexfloating
    4429             : #define __pyx_ptype_5numpy_flexible __pyx_mstate_global->__pyx_ptype_5numpy_flexible
    4430             : #define __pyx_ptype_5numpy_character __pyx_mstate_global->__pyx_ptype_5numpy_character
    4431             : #define __pyx_ptype_5numpy_ufunc __pyx_mstate_global->__pyx_ptype_5numpy_ufunc
    4432             : #if CYTHON_USE_MODULE_STATE
    4433             : #endif
    4434             : #if CYTHON_USE_MODULE_STATE
    4435             : #define __pyx_type___pyx_array __pyx_mstate_global->__pyx_type___pyx_array
    4436             : #define __pyx_type___pyx_MemviewEnum __pyx_mstate_global->__pyx_type___pyx_MemviewEnum
    4437             : #define __pyx_type___pyx_memoryview __pyx_mstate_global->__pyx_type___pyx_memoryview
    4438             : #define __pyx_type___pyx_memoryviewslice __pyx_mstate_global->__pyx_type___pyx_memoryviewslice
    4439             : #endif
    4440             : #define __pyx_array_type __pyx_mstate_global->__pyx_array_type
    4441             : #define __pyx_MemviewEnum_type __pyx_mstate_global->__pyx_MemviewEnum_type
    4442             : #define __pyx_memoryview_type __pyx_mstate_global->__pyx_memoryview_type
    4443             : #define __pyx_memoryviewslice_type __pyx_mstate_global->__pyx_memoryviewslice_type
    4444             : #define __pyx_kp_u_ __pyx_mstate_global->__pyx_kp_u_
    4445             : #define __pyx_n_s_ASCII __pyx_mstate_global->__pyx_n_s_ASCII
    4446             : #define __pyx_kp_s_All_dimensions_preceding_dimensi __pyx_mstate_global->__pyx_kp_s_All_dimensions_preceding_dimensi
    4447             : #define __pyx_n_s_AssertionError __pyx_mstate_global->__pyx_n_s_AssertionError
    4448             : #define __pyx_kp_s_Buffer_view_does_not_expose_stri __pyx_mstate_global->__pyx_kp_s_Buffer_view_does_not_expose_stri
    4449             : #define __pyx_kp_s_Can_only_create_a_buffer_that_is __pyx_mstate_global->__pyx_kp_s_Can_only_create_a_buffer_that_is
    4450             : #define __pyx_kp_s_Cannot_assign_to_read_only_memor __pyx_mstate_global->__pyx_kp_s_Cannot_assign_to_read_only_memor
    4451             : #define __pyx_kp_s_Cannot_create_writable_memory_vi __pyx_mstate_global->__pyx_kp_s_Cannot_create_writable_memory_vi
    4452             : #define __pyx_kp_u_Cannot_index_with_type __pyx_mstate_global->__pyx_kp_u_Cannot_index_with_type
    4453             : #define __pyx_kp_s_Cannot_transpose_memoryview_with __pyx_mstate_global->__pyx_kp_s_Cannot_transpose_memoryview_with
    4454             : #define __pyx_n_u_D __pyx_mstate_global->__pyx_n_u_D
    4455             : #define __pyx_kp_s_Dimension_d_is_not_direct __pyx_mstate_global->__pyx_kp_s_Dimension_d_is_not_direct
    4456             : #define __pyx_n_s_Ellipsis __pyx_mstate_global->__pyx_n_s_Ellipsis
    4457             : #define __pyx_kp_s_Empty_shape_tuple_for_cython_arr __pyx_mstate_global->__pyx_kp_s_Empty_shape_tuple_for_cython_arr
    4458             : #define __pyx_n_u_F __pyx_mstate_global->__pyx_n_u_F
    4459             : #define __pyx_n_s_ImportError __pyx_mstate_global->__pyx_n_s_ImportError
    4460             : #define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0
    4461             : #define __pyx_n_s_IndexError __pyx_mstate_global->__pyx_n_s_IndexError
    4462             : #define __pyx_kp_s_Index_out_of_bounds_axis_d __pyx_mstate_global->__pyx_kp_s_Index_out_of_bounds_axis_d
    4463             : #define __pyx_kp_s_Indirect_dimensions_not_supporte __pyx_mstate_global->__pyx_kp_s_Indirect_dimensions_not_supporte
    4464             : #define __pyx_kp_u_Invalid_mode_expected_c_or_fortr __pyx_mstate_global->__pyx_kp_u_Invalid_mode_expected_c_or_fortr
    4465             : #define __pyx_kp_u_Invalid_shape_in_axis __pyx_mstate_global->__pyx_kp_u_Invalid_shape_in_axis
    4466             : #define __pyx_n_s_MemoryError __pyx_mstate_global->__pyx_n_s_MemoryError
    4467             : #define __pyx_kp_s_MemoryView_of_r_at_0x_x __pyx_mstate_global->__pyx_kp_s_MemoryView_of_r_at_0x_x
    4468             : #define __pyx_kp_s_MemoryView_of_r_object __pyx_mstate_global->__pyx_kp_s_MemoryView_of_r_object
    4469             : #define __pyx_n_b_O __pyx_mstate_global->__pyx_n_b_O
    4470             : #define __pyx_kp_u_Out_of_bounds_on_buffer_access_a __pyx_mstate_global->__pyx_kp_u_Out_of_bounds_on_buffer_access_a
    4471             : #define __pyx_n_s_PickleError __pyx_mstate_global->__pyx_n_s_PickleError
    4472             : #define __pyx_n_s_Sequence __pyx_mstate_global->__pyx_n_s_Sequence
    4473             : #define __pyx_kp_s_Step_may_not_be_zero_axis_d __pyx_mstate_global->__pyx_kp_s_Step_may_not_be_zero_axis_d
    4474             : #define __pyx_n_s_TypeError __pyx_mstate_global->__pyx_n_s_TypeError
    4475             : #define __pyx_kp_s_Unable_to_convert_item_to_object __pyx_mstate_global->__pyx_kp_s_Unable_to_convert_item_to_object
    4476             : #define __pyx_kp_u_Unsupported_type_given_to_lu_dis __pyx_mstate_global->__pyx_kp_u_Unsupported_type_given_to_lu_dis
    4477             : #define __pyx_n_s_ValueError __pyx_mstate_global->__pyx_n_s_ValueError
    4478             : #define __pyx_n_s_View_MemoryView __pyx_mstate_global->__pyx_n_s_View_MemoryView
    4479             : #define __pyx_kp_u__2 __pyx_mstate_global->__pyx_kp_u__2
    4480             : #define __pyx_n_s__3 __pyx_mstate_global->__pyx_n_s__3
    4481             : #define __pyx_kp_u__6 __pyx_mstate_global->__pyx_kp_u__6
    4482             : #define __pyx_kp_u__7 __pyx_mstate_global->__pyx_kp_u__7
    4483             : #define __pyx_n_s__74 __pyx_mstate_global->__pyx_n_s__74
    4484             : #define __pyx_n_s_a __pyx_mstate_global->__pyx_n_s_a
    4485             : #define __pyx_n_s_abc __pyx_mstate_global->__pyx_n_s_abc
    4486             : #define __pyx_n_s_allocate_buffer __pyx_mstate_global->__pyx_n_s_allocate_buffer
    4487             : #define __pyx_kp_u_and __pyx_mstate_global->__pyx_kp_u_and
    4488             : #define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines
    4489             : #define __pyx_n_s_base __pyx_mstate_global->__pyx_n_s_base
    4490             : #define __pyx_n_s_c __pyx_mstate_global->__pyx_n_s_c
    4491             : #define __pyx_n_u_c __pyx_mstate_global->__pyx_n_u_c
    4492             : #define __pyx_n_s_char __pyx_mstate_global->__pyx_n_s_char
    4493             : #define __pyx_n_s_class __pyx_mstate_global->__pyx_n_s_class
    4494             : #define __pyx_n_s_class_getitem __pyx_mstate_global->__pyx_n_s_class_getitem
    4495             : #define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback
    4496             : #define __pyx_n_s_collections __pyx_mstate_global->__pyx_n_s_collections
    4497             : #define __pyx_kp_s_collections_abc __pyx_mstate_global->__pyx_kp_s_collections_abc
    4498             : #define __pyx_kp_s_contiguous_and_direct __pyx_mstate_global->__pyx_kp_s_contiguous_and_direct
    4499             : #define __pyx_kp_s_contiguous_and_indirect __pyx_mstate_global->__pyx_kp_s_contiguous_and_indirect
    4500             : #define __pyx_n_s_count __pyx_mstate_global->__pyx_n_s_count
    4501             : #define __pyx_n_u_d __pyx_mstate_global->__pyx_n_u_d
    4502             : #define __pyx_n_s_dict __pyx_mstate_global->__pyx_n_s_dict
    4503             : #define __pyx_kp_u_disable __pyx_mstate_global->__pyx_kp_u_disable
    4504             : #define __pyx_n_s_dtype __pyx_mstate_global->__pyx_n_s_dtype
    4505             : #define __pyx_n_s_dtype_is_object __pyx_mstate_global->__pyx_n_s_dtype_is_object
    4506             : #define __pyx_kp_u_enable __pyx_mstate_global->__pyx_kp_u_enable
    4507             : #define __pyx_n_s_encode __pyx_mstate_global->__pyx_n_s_encode
    4508             : #define __pyx_n_s_enumerate __pyx_mstate_global->__pyx_n_s_enumerate
    4509             : #define __pyx_n_s_error __pyx_mstate_global->__pyx_n_s_error
    4510             : #define __pyx_n_u_f __pyx_mstate_global->__pyx_n_u_f
    4511             : #define __pyx_n_s_flags __pyx_mstate_global->__pyx_n_s_flags
    4512             : #define __pyx_n_s_format __pyx_mstate_global->__pyx_n_s_format
    4513             : #define __pyx_n_s_fortran __pyx_mstate_global->__pyx_n_s_fortran
    4514             : #define __pyx_n_u_fortran __pyx_mstate_global->__pyx_n_u_fortran
    4515             : #define __pyx_kp_u_gc __pyx_mstate_global->__pyx_kp_u_gc
    4516             : #define __pyx_n_s_getstate __pyx_mstate_global->__pyx_n_s_getstate
    4517             : #define __pyx_kp_u_got __pyx_mstate_global->__pyx_kp_u_got
    4518             : #define __pyx_kp_u_got_differing_extents_in_dimensi __pyx_mstate_global->__pyx_kp_u_got_differing_extents_in_dimensi
    4519             : #define __pyx_kp_s_home_czgdp18079_Quansight_scipy __pyx_mstate_global->__pyx_kp_s_home_czgdp18079_Quansight_scipy
    4520             : #define __pyx_n_s_id __pyx_mstate_global->__pyx_n_s_id
    4521             : #define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import
    4522             : #define __pyx_n_s_index __pyx_mstate_global->__pyx_n_s_index
    4523             : #define __pyx_n_s_initializing __pyx_mstate_global->__pyx_n_s_initializing
    4524             : #define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine
    4525             : #define __pyx_kp_u_isenabled __pyx_mstate_global->__pyx_kp_u_isenabled
    4526             : #define __pyx_n_s_itemsize __pyx_mstate_global->__pyx_n_s_itemsize
    4527             : #define __pyx_kp_s_itemsize_0_for_cython_array __pyx_mstate_global->__pyx_kp_s_itemsize_0_for_cython_array
    4528             : #define __pyx_n_s_lu_dispatcher __pyx_mstate_global->__pyx_n_s_lu_dispatcher
    4529             : #define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main
    4530             : #define __pyx_n_s_memview __pyx_mstate_global->__pyx_n_s_memview
    4531             : #define __pyx_n_s_mode __pyx_mstate_global->__pyx_n_s_mode
    4532             : #define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name
    4533             : #define __pyx_n_s_name_2 __pyx_mstate_global->__pyx_n_s_name_2
    4534             : #define __pyx_n_s_ndim __pyx_mstate_global->__pyx_n_s_ndim
    4535             : #define __pyx_n_s_new __pyx_mstate_global->__pyx_n_s_new
    4536             : #define __pyx_kp_s_no_default___reduce___due_to_non __pyx_mstate_global->__pyx_kp_s_no_default___reduce___due_to_non
    4537             : #define __pyx_kp_u_numpy__core_multiarray_failed_to __pyx_mstate_global->__pyx_kp_u_numpy__core_multiarray_failed_to
    4538             : #define __pyx_kp_u_numpy__core_umath_failed_to_impo __pyx_mstate_global->__pyx_kp_u_numpy__core_umath_failed_to_impo
    4539             : #define __pyx_n_s_obj __pyx_mstate_global->__pyx_n_s_obj
    4540             : #define __pyx_n_s_pack __pyx_mstate_global->__pyx_n_s_pack
    4541             : #define __pyx_n_s_permute_l __pyx_mstate_global->__pyx_n_s_permute_l
    4542             : #define __pyx_n_s_pickle __pyx_mstate_global->__pyx_n_s_pickle
    4543             : #define __pyx_n_s_piv __pyx_mstate_global->__pyx_n_s_piv
    4544             : #define __pyx_n_s_pyx_PickleError __pyx_mstate_global->__pyx_n_s_pyx_PickleError
    4545             : #define __pyx_n_s_pyx_checksum __pyx_mstate_global->__pyx_n_s_pyx_checksum
    4546             : #define __pyx_n_s_pyx_result __pyx_mstate_global->__pyx_n_s_pyx_result
    4547             : #define __pyx_n_s_pyx_state __pyx_mstate_global->__pyx_n_s_pyx_state
    4548             : #define __pyx_n_s_pyx_type __pyx_mstate_global->__pyx_n_s_pyx_type
    4549             : #define __pyx_n_s_pyx_unpickle_Enum __pyx_mstate_global->__pyx_n_s_pyx_unpickle_Enum
    4550             : #define __pyx_n_s_pyx_vtable __pyx_mstate_global->__pyx_n_s_pyx_vtable
    4551             : #define __pyx_n_s_range __pyx_mstate_global->__pyx_n_s_range
    4552             : #define __pyx_n_s_reduce __pyx_mstate_global->__pyx_n_s_reduce
    4553             : #define __pyx_n_s_reduce_cython __pyx_mstate_global->__pyx_n_s_reduce_cython
    4554             : #define __pyx_n_s_reduce_ex __pyx_mstate_global->__pyx_n_s_reduce_ex
    4555             : #define __pyx_n_s_register __pyx_mstate_global->__pyx_n_s_register
    4556             : #define __pyx_n_s_scipy_linalg__decomp_lu_cython __pyx_mstate_global->__pyx_n_s_scipy_linalg__decomp_lu_cython
    4557             : #define __pyx_kp_u_scipy_linalg_lu_failed_to_alloca __pyx_mstate_global->__pyx_kp_u_scipy_linalg_lu_failed_to_alloca
    4558             : #define __pyx_kp_u_scipy_linalg_lu_has_encountered __pyx_mstate_global->__pyx_kp_u_scipy_linalg_lu_has_encountered
    4559             : #define __pyx_n_s_setstate __pyx_mstate_global->__pyx_n_s_setstate
    4560             : #define __pyx_n_s_setstate_cython __pyx_mstate_global->__pyx_n_s_setstate_cython
    4561             : #define __pyx_n_s_shape __pyx_mstate_global->__pyx_n_s_shape
    4562             : #define __pyx_n_s_size __pyx_mstate_global->__pyx_n_s_size
    4563             : #define __pyx_n_s_spec __pyx_mstate_global->__pyx_n_s_spec
    4564             : #define __pyx_n_s_start __pyx_mstate_global->__pyx_n_s_start
    4565             : #define __pyx_n_s_step __pyx_mstate_global->__pyx_n_s_step
    4566             : #define __pyx_n_s_stop __pyx_mstate_global->__pyx_n_s_stop
    4567             : #define __pyx_kp_s_strided_and_direct __pyx_mstate_global->__pyx_kp_s_strided_and_direct
    4568             : #define __pyx_kp_s_strided_and_direct_or_indirect __pyx_mstate_global->__pyx_kp_s_strided_and_direct_or_indirect
    4569             : #define __pyx_kp_s_strided_and_indirect __pyx_mstate_global->__pyx_kp_s_strided_and_indirect
    4570             : #define __pyx_kp_s_stringsource __pyx_mstate_global->__pyx_kp_s_stringsource
    4571             : #define __pyx_n_s_struct __pyx_mstate_global->__pyx_n_s_struct
    4572             : #define __pyx_n_s_sys __pyx_mstate_global->__pyx_n_s_sys
    4573             : #define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test
    4574             : #define __pyx_kp_u_th_parameter __pyx_mstate_global->__pyx_kp_u_th_parameter
    4575             : #define __pyx_n_s_u __pyx_mstate_global->__pyx_n_s_u
    4576             : #define __pyx_kp_s_unable_to_allocate_array_data __pyx_mstate_global->__pyx_kp_s_unable_to_allocate_array_data
    4577             : #define __pyx_kp_s_unable_to_allocate_shape_and_str __pyx_mstate_global->__pyx_kp_s_unable_to_allocate_shape_and_str
    4578             : #define __pyx_n_s_unpack __pyx_mstate_global->__pyx_n_s_unpack
    4579             : #define __pyx_n_s_update __pyx_mstate_global->__pyx_n_s_update
    4580             : #define __pyx_n_s_version_info __pyx_mstate_global->__pyx_n_s_version_info
    4581             : #define __pyx_int_0 __pyx_mstate_global->__pyx_int_0
    4582             : #define __pyx_int_1 __pyx_mstate_global->__pyx_int_1
    4583             : #define __pyx_int_3 __pyx_mstate_global->__pyx_int_3
    4584             : #define __pyx_int_112105877 __pyx_mstate_global->__pyx_int_112105877
    4585             : #define __pyx_int_136983863 __pyx_mstate_global->__pyx_int_136983863
    4586             : #define __pyx_int_184977713 __pyx_mstate_global->__pyx_int_184977713
    4587             : #define __pyx_int_neg_1 __pyx_mstate_global->__pyx_int_neg_1
    4588             : #define __pyx_slice__5 __pyx_mstate_global->__pyx_slice__5
    4589             : #define __pyx_tuple__4 __pyx_mstate_global->__pyx_tuple__4
    4590             : #define __pyx_tuple__8 __pyx_mstate_global->__pyx_tuple__8
    4591             : #define __pyx_tuple__9 __pyx_mstate_global->__pyx_tuple__9
    4592             : #define __pyx_slice__12 __pyx_mstate_global->__pyx_slice__12
    4593             : #define __pyx_slice__13 __pyx_mstate_global->__pyx_slice__13
    4594             : #define __pyx_slice__15 __pyx_mstate_global->__pyx_slice__15
    4595             : #define __pyx_slice__16 __pyx_mstate_global->__pyx_slice__16
    4596             : #define __pyx_slice__18 __pyx_mstate_global->__pyx_slice__18
    4597             : #define __pyx_slice__19 __pyx_mstate_global->__pyx_slice__19
    4598             : #define __pyx_slice__20 __pyx_mstate_global->__pyx_slice__20
    4599             : #define __pyx_slice__21 __pyx_mstate_global->__pyx_slice__21
    4600             : #define __pyx_slice__23 __pyx_mstate_global->__pyx_slice__23
    4601             : #define __pyx_slice__24 __pyx_mstate_global->__pyx_slice__24
    4602             : #define __pyx_slice__25 __pyx_mstate_global->__pyx_slice__25
    4603             : #define __pyx_slice__27 __pyx_mstate_global->__pyx_slice__27
    4604             : #define __pyx_slice__28 __pyx_mstate_global->__pyx_slice__28
    4605             : #define __pyx_slice__30 __pyx_mstate_global->__pyx_slice__30
    4606             : #define __pyx_slice__31 __pyx_mstate_global->__pyx_slice__31
    4607             : #define __pyx_slice__32 __pyx_mstate_global->__pyx_slice__32
    4608             : #define __pyx_slice__33 __pyx_mstate_global->__pyx_slice__33
    4609             : #define __pyx_slice__35 __pyx_mstate_global->__pyx_slice__35
    4610             : #define __pyx_slice__36 __pyx_mstate_global->__pyx_slice__36
    4611             : #define __pyx_slice__37 __pyx_mstate_global->__pyx_slice__37
    4612             : #define __pyx_slice__39 __pyx_mstate_global->__pyx_slice__39
    4613             : #define __pyx_slice__40 __pyx_mstate_global->__pyx_slice__40
    4614             : #define __pyx_slice__42 __pyx_mstate_global->__pyx_slice__42
    4615             : #define __pyx_slice__43 __pyx_mstate_global->__pyx_slice__43
    4616             : #define __pyx_slice__44 __pyx_mstate_global->__pyx_slice__44
    4617             : #define __pyx_slice__45 __pyx_mstate_global->__pyx_slice__45
    4618             : #define __pyx_slice__47 __pyx_mstate_global->__pyx_slice__47
    4619             : #define __pyx_slice__48 __pyx_mstate_global->__pyx_slice__48
    4620             : #define __pyx_slice__49 __pyx_mstate_global->__pyx_slice__49
    4621             : #define __pyx_slice__51 __pyx_mstate_global->__pyx_slice__51
    4622             : #define __pyx_slice__52 __pyx_mstate_global->__pyx_slice__52
    4623             : #define __pyx_slice__54 __pyx_mstate_global->__pyx_slice__54
    4624             : #define __pyx_slice__55 __pyx_mstate_global->__pyx_slice__55
    4625             : #define __pyx_slice__56 __pyx_mstate_global->__pyx_slice__56
    4626             : #define __pyx_slice__57 __pyx_mstate_global->__pyx_slice__57
    4627             : #define __pyx_slice__59 __pyx_mstate_global->__pyx_slice__59
    4628             : #define __pyx_tuple__10 __pyx_mstate_global->__pyx_tuple__10
    4629             : #define __pyx_tuple__11 __pyx_mstate_global->__pyx_tuple__11
    4630             : #define __pyx_tuple__14 __pyx_mstate_global->__pyx_tuple__14
    4631             : #define __pyx_tuple__17 __pyx_mstate_global->__pyx_tuple__17
    4632             : #define __pyx_tuple__22 __pyx_mstate_global->__pyx_tuple__22
    4633             : #define __pyx_tuple__26 __pyx_mstate_global->__pyx_tuple__26
    4634             : #define __pyx_tuple__29 __pyx_mstate_global->__pyx_tuple__29
    4635             : #define __pyx_tuple__34 __pyx_mstate_global->__pyx_tuple__34
    4636             : #define __pyx_tuple__38 __pyx_mstate_global->__pyx_tuple__38
    4637             : #define __pyx_tuple__41 __pyx_mstate_global->__pyx_tuple__41
    4638             : #define __pyx_tuple__46 __pyx_mstate_global->__pyx_tuple__46
    4639             : #define __pyx_tuple__50 __pyx_mstate_global->__pyx_tuple__50
    4640             : #define __pyx_tuple__53 __pyx_mstate_global->__pyx_tuple__53
    4641             : #define __pyx_tuple__58 __pyx_mstate_global->__pyx_tuple__58
    4642             : #define __pyx_tuple__60 __pyx_mstate_global->__pyx_tuple__60
    4643             : #define __pyx_tuple__61 __pyx_mstate_global->__pyx_tuple__61
    4644             : #define __pyx_tuple__62 __pyx_mstate_global->__pyx_tuple__62
    4645             : #define __pyx_tuple__63 __pyx_mstate_global->__pyx_tuple__63
    4646             : #define __pyx_tuple__64 __pyx_mstate_global->__pyx_tuple__64
    4647             : #define __pyx_tuple__65 __pyx_mstate_global->__pyx_tuple__65
    4648             : #define __pyx_tuple__66 __pyx_mstate_global->__pyx_tuple__66
    4649             : #define __pyx_tuple__67 __pyx_mstate_global->__pyx_tuple__67
    4650             : #define __pyx_tuple__68 __pyx_mstate_global->__pyx_tuple__68
    4651             : #define __pyx_tuple__69 __pyx_mstate_global->__pyx_tuple__69
    4652             : #define __pyx_tuple__70 __pyx_mstate_global->__pyx_tuple__70
    4653             : #define __pyx_tuple__72 __pyx_mstate_global->__pyx_tuple__72
    4654             : #define __pyx_codeobj__71 __pyx_mstate_global->__pyx_codeobj__71
    4655             : #define __pyx_codeobj__73 __pyx_mstate_global->__pyx_codeobj__73
    4656             : /* #### Code section: module_code ### */
    4657             : 
    4658             : /* "View.MemoryView":131
    4659             :  *         cdef bint dtype_is_object
    4660             :  * 
    4661             :  *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
    4662             :  *                   mode="c", bint allocate_buffer=True):
    4663             :  * 
    4664             :  */
    4665             : 
    4666             : /* Python wrapper */
    4667             : static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    4668           0 : static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
    4669           0 :   PyObject *__pyx_v_shape = 0;
    4670           0 :   Py_ssize_t __pyx_v_itemsize;
    4671           0 :   PyObject *__pyx_v_format = 0;
    4672           0 :   PyObject *__pyx_v_mode = 0;
    4673           0 :   int __pyx_v_allocate_buffer;
    4674           0 :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
    4675           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    4676           0 :   PyObject* values[5] = {0,0,0,0,0};
    4677           0 :   int __pyx_lineno = 0;
    4678           0 :   const char *__pyx_filename = NULL;
    4679           0 :   int __pyx_clineno = 0;
    4680           0 :   int __pyx_r;
    4681             :   __Pyx_RefNannyDeclarations
    4682           0 :   __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
    4683             :   #if CYTHON_ASSUME_SAFE_MACROS
    4684           0 :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
    4685             :   #else
    4686             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
    4687             :   #endif
    4688           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    4689             :   {
    4690           0 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shape,&__pyx_n_s_itemsize,&__pyx_n_s_format,&__pyx_n_s_mode,&__pyx_n_s_allocate_buffer,0};
    4691           0 :     values[3] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_n_s_c));
    4692           0 :     if (__pyx_kwds) {
    4693           0 :       Py_ssize_t kw_args;
    4694           0 :       switch (__pyx_nargs) {
    4695           0 :         case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
    4696           0 :         CYTHON_FALLTHROUGH;
    4697           0 :         case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
    4698           0 :         CYTHON_FALLTHROUGH;
    4699           0 :         case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
    4700           0 :         CYTHON_FALLTHROUGH;
    4701           0 :         case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
    4702           0 :         CYTHON_FALLTHROUGH;
    4703           0 :         case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
    4704           0 :         CYTHON_FALLTHROUGH;
    4705           0 :         case  0: break;
    4706           0 :         default: goto __pyx_L5_argtuple_error;
    4707             :       }
    4708           0 :       kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
    4709           0 :       switch (__pyx_nargs) {
    4710           0 :         case  0:
    4711           0 :         if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_shape)) != 0)) {
    4712           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
    4713           0 :           kw_args--;
    4714             :         }
    4715           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
    4716           0 :         else goto __pyx_L5_argtuple_error;
    4717           0 :         CYTHON_FALLTHROUGH;
    4718             :         case  1:
    4719           0 :         if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_itemsize)) != 0)) {
    4720           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
    4721           0 :           kw_args--;
    4722             :         }
    4723           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
    4724             :         else {
    4725           0 :           __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); __PYX_ERR(1, 131, __pyx_L3_error)
    4726             :         }
    4727           0 :         CYTHON_FALLTHROUGH;
    4728             :         case  2:
    4729           0 :         if (likely((values[2] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_format)) != 0)) {
    4730           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[2]);
    4731           0 :           kw_args--;
    4732             :         }
    4733           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
    4734             :         else {
    4735           0 :           __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); __PYX_ERR(1, 131, __pyx_L3_error)
    4736             :         }
    4737           0 :         CYTHON_FALLTHROUGH;
    4738             :         case  3:
    4739           0 :         if (kw_args > 0) {
    4740           0 :           PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_mode);
    4741           0 :           if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
    4742           0 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
    4743             :         }
    4744           0 :         CYTHON_FALLTHROUGH;
    4745             :         case  4:
    4746           0 :         if (kw_args > 0) {
    4747           0 :           PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_allocate_buffer);
    4748           0 :           if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
    4749           0 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
    4750             :         }
    4751             :       }
    4752           0 :       if (unlikely(kw_args > 0)) {
    4753           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
    4754           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(1, 131, __pyx_L3_error)
    4755             :       }
    4756             :     } else {
    4757           0 :       switch (__pyx_nargs) {
    4758           0 :         case  5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
    4759           0 :         CYTHON_FALLTHROUGH;
    4760           0 :         case  4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
    4761           0 :         CYTHON_FALLTHROUGH;
    4762           0 :         case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
    4763           0 :         values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
    4764           0 :         values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
    4765           0 :         break;
    4766           0 :         default: goto __pyx_L5_argtuple_error;
    4767             :       }
    4768             :     }
    4769           0 :     __pyx_v_shape = ((PyObject*)values[0]);
    4770           0 :     __pyx_v_itemsize = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 131, __pyx_L3_error)
    4771           0 :     __pyx_v_format = values[2];
    4772           0 :     __pyx_v_mode = values[3];
    4773           0 :     if (values[4]) {
    4774           0 :       __pyx_v_allocate_buffer = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_allocate_buffer == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 132, __pyx_L3_error)
    4775             :     } else {
    4776             : 
    4777             :       /* "View.MemoryView":132
    4778             :  * 
    4779             :  *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,
    4780             :  *                   mode="c", bint allocate_buffer=True):             # <<<<<<<<<<<<<<
    4781             :  * 
    4782             :  *         cdef int idx
    4783             :  */
    4784             :       __pyx_v_allocate_buffer = ((int)1);
    4785             :     }
    4786             :   }
    4787           0 :   goto __pyx_L6_skip;
    4788           0 :   __pyx_L5_argtuple_error:;
    4789           0 :   __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, __pyx_nargs); __PYX_ERR(1, 131, __pyx_L3_error)
    4790           0 :   __pyx_L6_skip:;
    4791           0 :   goto __pyx_L4_argument_unpacking_done;
    4792           0 :   __pyx_L3_error:;
    4793             :   {
    4794           0 :     Py_ssize_t __pyx_temp;
    4795           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    4796             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    4797             :     }
    4798             :   }
    4799           0 :   __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    4800           0 :   __Pyx_RefNannyFinishContext();
    4801           0 :   return -1;
    4802           0 :   __pyx_L4_argument_unpacking_done:;
    4803           0 :   if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1, "shape", 1))) __PYX_ERR(1, 131, __pyx_L1_error)
    4804           0 :   if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) {
    4805           0 :     PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); __PYX_ERR(1, 131, __pyx_L1_error)
    4806             :   }
    4807           0 :   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v_shape, __pyx_v_itemsize, __pyx_v_format, __pyx_v_mode, __pyx_v_allocate_buffer);
    4808             : 
    4809             :   /* "View.MemoryView":131
    4810             :  *         cdef bint dtype_is_object
    4811             :  * 
    4812             :  *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
    4813             :  *                   mode="c", bint allocate_buffer=True):
    4814             :  * 
    4815             :  */
    4816             : 
    4817             :   /* function exit code */
    4818           0 :   goto __pyx_L0;
    4819             :   __pyx_L1_error:;
    4820             :   __pyx_r = -1;
    4821           0 :   __pyx_L0:;
    4822             :   {
    4823           0 :     Py_ssize_t __pyx_temp;
    4824           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    4825             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    4826             :     }
    4827             :   }
    4828             :   __Pyx_RefNannyFinishContext();
    4829             :   return __pyx_r;
    4830             : }
    4831             : 
    4832           0 : static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer) {
    4833           0 :   int __pyx_v_idx;
    4834           0 :   Py_ssize_t __pyx_v_dim;
    4835           0 :   char __pyx_v_order;
    4836           0 :   int __pyx_r;
    4837             :   __Pyx_RefNannyDeclarations
    4838           0 :   Py_ssize_t __pyx_t_1;
    4839           0 :   int __pyx_t_2;
    4840           0 :   int __pyx_t_3;
    4841           0 :   PyObject *__pyx_t_4 = NULL;
    4842           0 :   PyObject *__pyx_t_5 = NULL;
    4843           0 :   PyObject *__pyx_t_6 = NULL;
    4844           0 :   unsigned int __pyx_t_7;
    4845           0 :   char *__pyx_t_8;
    4846           0 :   int __pyx_t_9;
    4847           0 :   Py_ssize_t __pyx_t_10;
    4848           0 :   Py_UCS4 __pyx_t_11;
    4849           0 :   int __pyx_lineno = 0;
    4850           0 :   const char *__pyx_filename = NULL;
    4851           0 :   int __pyx_clineno = 0;
    4852           0 :   __Pyx_RefNannySetupContext("__cinit__", 0);
    4853           0 :   __Pyx_INCREF(__pyx_v_format);
    4854             : 
    4855             :   /* "View.MemoryView":137
    4856             :  *         cdef Py_ssize_t dim
    4857             :  * 
    4858             :  *         self.ndim = <int> len(shape)             # <<<<<<<<<<<<<<
    4859             :  *         self.itemsize = itemsize
    4860             :  * 
    4861             :  */
    4862           0 :   if (unlikely(__pyx_v_shape == Py_None)) {
    4863           0 :     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    4864           0 :     __PYX_ERR(1, 137, __pyx_L1_error)
    4865             :   }
    4866           0 :   __pyx_t_1 = __Pyx_PyTuple_GET_SIZE(__pyx_v_shape); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 137, __pyx_L1_error)
    4867           0 :   __pyx_v_self->ndim = ((int)__pyx_t_1);
    4868             : 
    4869             :   /* "View.MemoryView":138
    4870             :  * 
    4871             :  *         self.ndim = <int> len(shape)
    4872             :  *         self.itemsize = itemsize             # <<<<<<<<<<<<<<
    4873             :  * 
    4874             :  *         if not self.ndim:
    4875             :  */
    4876           0 :   __pyx_v_self->itemsize = __pyx_v_itemsize;
    4877             : 
    4878             :   /* "View.MemoryView":140
    4879             :  *         self.itemsize = itemsize
    4880             :  * 
    4881             :  *         if not self.ndim:             # <<<<<<<<<<<<<<
    4882             :  *             raise ValueError, "Empty shape tuple for cython.array"
    4883             :  * 
    4884             :  */
    4885           0 :   __pyx_t_2 = (!(__pyx_v_self->ndim != 0));
    4886           0 :   if (unlikely(__pyx_t_2)) {
    4887             : 
    4888             :     /* "View.MemoryView":141
    4889             :  * 
    4890             :  *         if not self.ndim:
    4891             :  *             raise ValueError, "Empty shape tuple for cython.array"             # <<<<<<<<<<<<<<
    4892             :  * 
    4893             :  *         if itemsize <= 0:
    4894             :  */
    4895           0 :     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Empty_shape_tuple_for_cython_arr, 0, 0);
    4896           0 :     __PYX_ERR(1, 141, __pyx_L1_error)
    4897             : 
    4898             :     /* "View.MemoryView":140
    4899             :  *         self.itemsize = itemsize
    4900             :  * 
    4901             :  *         if not self.ndim:             # <<<<<<<<<<<<<<
    4902             :  *             raise ValueError, "Empty shape tuple for cython.array"
    4903             :  * 
    4904             :  */
    4905             :   }
    4906             : 
    4907             :   /* "View.MemoryView":143
    4908             :  *             raise ValueError, "Empty shape tuple for cython.array"
    4909             :  * 
    4910             :  *         if itemsize <= 0:             # <<<<<<<<<<<<<<
    4911             :  *             raise ValueError, "itemsize <= 0 for cython.array"
    4912             :  * 
    4913             :  */
    4914           0 :   __pyx_t_2 = (__pyx_v_itemsize <= 0);
    4915           0 :   if (unlikely(__pyx_t_2)) {
    4916             : 
    4917             :     /* "View.MemoryView":144
    4918             :  * 
    4919             :  *         if itemsize <= 0:
    4920             :  *             raise ValueError, "itemsize <= 0 for cython.array"             # <<<<<<<<<<<<<<
    4921             :  * 
    4922             :  *         if not isinstance(format, bytes):
    4923             :  */
    4924           0 :     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_itemsize_0_for_cython_array, 0, 0);
    4925           0 :     __PYX_ERR(1, 144, __pyx_L1_error)
    4926             : 
    4927             :     /* "View.MemoryView":143
    4928             :  *             raise ValueError, "Empty shape tuple for cython.array"
    4929             :  * 
    4930             :  *         if itemsize <= 0:             # <<<<<<<<<<<<<<
    4931             :  *             raise ValueError, "itemsize <= 0 for cython.array"
    4932             :  * 
    4933             :  */
    4934             :   }
    4935             : 
    4936             :   /* "View.MemoryView":146
    4937             :  *             raise ValueError, "itemsize <= 0 for cython.array"
    4938             :  * 
    4939             :  *         if not isinstance(format, bytes):             # <<<<<<<<<<<<<<
    4940             :  *             format = format.encode('ASCII')
    4941             :  *         self._format = format  # keep a reference to the byte string
    4942             :  */
    4943           0 :   __pyx_t_2 = PyBytes_Check(__pyx_v_format); 
    4944           0 :   __pyx_t_3 = (!__pyx_t_2);
    4945           0 :   if (__pyx_t_3) {
    4946             : 
    4947             :     /* "View.MemoryView":147
    4948             :  * 
    4949             :  *         if not isinstance(format, bytes):
    4950             :  *             format = format.encode('ASCII')             # <<<<<<<<<<<<<<
    4951             :  *         self._format = format  # keep a reference to the byte string
    4952             :  *         self.format = self._format
    4953             :  */
    4954           0 :     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 147, __pyx_L1_error)
    4955           0 :     __Pyx_GOTREF(__pyx_t_5);
    4956           0 :     __pyx_t_6 = NULL;
    4957           0 :     __pyx_t_7 = 0;
    4958             :     #if CYTHON_UNPACK_METHODS
    4959           0 :     if (likely(PyMethod_Check(__pyx_t_5))) {
    4960           0 :       __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    4961           0 :       if (likely(__pyx_t_6)) {
    4962           0 :         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
    4963           0 :         __Pyx_INCREF(__pyx_t_6);
    4964           0 :         __Pyx_INCREF(function);
    4965           0 :         __Pyx_DECREF_SET(__pyx_t_5, function);
    4966             :         __pyx_t_7 = 1;
    4967             :       }
    4968             :     }
    4969             :     #endif
    4970             :     {
    4971           0 :       PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_n_s_ASCII};
    4972           0 :       __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    4973           0 :       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    4974           0 :       if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 147, __pyx_L1_error)
    4975           0 :       __Pyx_GOTREF(__pyx_t_4);
    4976           0 :       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    4977             :     }
    4978           0 :     __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_4);
    4979             :     __pyx_t_4 = 0;
    4980             : 
    4981             :     /* "View.MemoryView":146
    4982             :  *             raise ValueError, "itemsize <= 0 for cython.array"
    4983             :  * 
    4984             :  *         if not isinstance(format, bytes):             # <<<<<<<<<<<<<<
    4985             :  *             format = format.encode('ASCII')
    4986             :  *         self._format = format  # keep a reference to the byte string
    4987             :  */
    4988             :   }
    4989             : 
    4990             :   /* "View.MemoryView":148
    4991             :  *         if not isinstance(format, bytes):
    4992             :  *             format = format.encode('ASCII')
    4993             :  *         self._format = format  # keep a reference to the byte string             # <<<<<<<<<<<<<<
    4994             :  *         self.format = self._format
    4995             :  * 
    4996             :  */
    4997           0 :   if (!(likely(PyBytes_CheckExact(__pyx_v_format))||((__pyx_v_format) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_v_format))) __PYX_ERR(1, 148, __pyx_L1_error)
    4998           0 :   __pyx_t_4 = __pyx_v_format;
    4999           0 :   __Pyx_INCREF(__pyx_t_4);
    5000           0 :   __Pyx_GIVEREF(__pyx_t_4);
    5001           0 :   __Pyx_GOTREF(__pyx_v_self->_format);
    5002           0 :   __Pyx_DECREF(__pyx_v_self->_format);
    5003           0 :   __pyx_v_self->_format = ((PyObject*)__pyx_t_4);
    5004           0 :   __pyx_t_4 = 0;
    5005             : 
    5006             :   /* "View.MemoryView":149
    5007             :  *             format = format.encode('ASCII')
    5008             :  *         self._format = format  # keep a reference to the byte string
    5009             :  *         self.format = self._format             # <<<<<<<<<<<<<<
    5010             :  * 
    5011             :  * 
    5012             :  */
    5013           0 :   if (unlikely(__pyx_v_self->_format == Py_None)) {
    5014           0 :     PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    5015           0 :     __PYX_ERR(1, 149, __pyx_L1_error)
    5016             :   }
    5017           0 :   __pyx_t_8 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_format); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(1, 149, __pyx_L1_error)
    5018           0 :   __pyx_v_self->format = __pyx_t_8;
    5019             : 
    5020             :   /* "View.MemoryView":152
    5021             :  * 
    5022             :  * 
    5023             :  *         self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)             # <<<<<<<<<<<<<<
    5024             :  *         self._strides = self._shape + self.ndim
    5025             :  * 
    5026             :  */
    5027           0 :   __pyx_v_self->_shape = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * __pyx_v_self->ndim) * 2)));
    5028             : 
    5029             :   /* "View.MemoryView":153
    5030             :  * 
    5031             :  *         self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)
    5032             :  *         self._strides = self._shape + self.ndim             # <<<<<<<<<<<<<<
    5033             :  * 
    5034             :  *         if not self._shape:
    5035             :  */
    5036           0 :   __pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim);
    5037             : 
    5038             :   /* "View.MemoryView":155
    5039             :  *         self._strides = self._shape + self.ndim
    5040             :  * 
    5041             :  *         if not self._shape:             # <<<<<<<<<<<<<<
    5042             :  *             raise MemoryError, "unable to allocate shape and strides."
    5043             :  * 
    5044             :  */
    5045           0 :   __pyx_t_3 = (!(__pyx_v_self->_shape != 0));
    5046           0 :   if (unlikely(__pyx_t_3)) {
    5047             : 
    5048             :     /* "View.MemoryView":156
    5049             :  * 
    5050             :  *         if not self._shape:
    5051             :  *             raise MemoryError, "unable to allocate shape and strides."             # <<<<<<<<<<<<<<
    5052             :  * 
    5053             :  * 
    5054             :  */
    5055           0 :     __Pyx_Raise(__pyx_builtin_MemoryError, __pyx_kp_s_unable_to_allocate_shape_and_str, 0, 0);
    5056           0 :     __PYX_ERR(1, 156, __pyx_L1_error)
    5057             : 
    5058             :     /* "View.MemoryView":155
    5059             :  *         self._strides = self._shape + self.ndim
    5060             :  * 
    5061             :  *         if not self._shape:             # <<<<<<<<<<<<<<
    5062             :  *             raise MemoryError, "unable to allocate shape and strides."
    5063             :  * 
    5064             :  */
    5065             :   }
    5066             : 
    5067             :   /* "View.MemoryView":159
    5068             :  * 
    5069             :  * 
    5070             :  *         for idx, dim in enumerate(shape):             # <<<<<<<<<<<<<<
    5071             :  *             if dim <= 0:
    5072             :  *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
    5073             :  */
    5074           0 :   __pyx_t_9 = 0;
    5075           0 :   __pyx_t_4 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_4);
    5076             :   __pyx_t_1 = 0;
    5077           0 :   for (;;) {
    5078           0 :     {
    5079           0 :       Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
    5080             :       #if !CYTHON_ASSUME_SAFE_MACROS
    5081             :       if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 159, __pyx_L1_error)
    5082             :       #endif
    5083           0 :       if (__pyx_t_1 >= __pyx_temp) break;
    5084             :     }
    5085             :     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    5086           0 :     __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely((0 < 0))) __PYX_ERR(1, 159, __pyx_L1_error)
    5087             :     #else
    5088             :     __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 159, __pyx_L1_error)
    5089             :     __Pyx_GOTREF(__pyx_t_5);
    5090             :     #endif
    5091           0 :     __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 159, __pyx_L1_error)
    5092           0 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    5093           0 :     __pyx_v_dim = __pyx_t_10;
    5094           0 :     __pyx_v_idx = __pyx_t_9;
    5095           0 :     __pyx_t_9 = (__pyx_t_9 + 1);
    5096             : 
    5097             :     /* "View.MemoryView":160
    5098             :  * 
    5099             :  *         for idx, dim in enumerate(shape):
    5100             :  *             if dim <= 0:             # <<<<<<<<<<<<<<
    5101             :  *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
    5102             :  *             self._shape[idx] = dim
    5103             :  */
    5104           0 :     __pyx_t_3 = (__pyx_v_dim <= 0);
    5105           0 :     if (unlikely(__pyx_t_3)) {
    5106             : 
    5107             :       /* "View.MemoryView":161
    5108             :  *         for idx, dim in enumerate(shape):
    5109             :  *             if dim <= 0:
    5110             :  *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."             # <<<<<<<<<<<<<<
    5111             :  *             self._shape[idx] = dim
    5112             :  * 
    5113             :  */
    5114           0 :       __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 161, __pyx_L1_error)
    5115           0 :       __Pyx_GOTREF(__pyx_t_5);
    5116           0 :       __pyx_t_10 = 0;
    5117           0 :       __pyx_t_11 = 127;
    5118           0 :       __Pyx_INCREF(__pyx_kp_u_Invalid_shape_in_axis);
    5119           0 :       __pyx_t_10 += 22;
    5120           0 :       __Pyx_GIVEREF(__pyx_kp_u_Invalid_shape_in_axis);
    5121           0 :       PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Invalid_shape_in_axis);
    5122           0 :       __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_idx, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 161, __pyx_L1_error)
    5123           0 :       __Pyx_GOTREF(__pyx_t_6);
    5124           0 :       __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    5125           0 :       __Pyx_GIVEREF(__pyx_t_6);
    5126           0 :       PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_6);
    5127           0 :       __pyx_t_6 = 0;
    5128           0 :       __Pyx_INCREF(__pyx_kp_u_);
    5129           0 :       __pyx_t_10 += 2;
    5130           0 :       __Pyx_GIVEREF(__pyx_kp_u_);
    5131           0 :       PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_);
    5132           0 :       __pyx_t_6 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 161, __pyx_L1_error)
    5133           0 :       __Pyx_GOTREF(__pyx_t_6);
    5134           0 :       __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
    5135           0 :       __Pyx_GIVEREF(__pyx_t_6);
    5136           0 :       PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_6);
    5137           0 :       __pyx_t_6 = 0;
    5138           0 :       __Pyx_INCREF(__pyx_kp_u__2);
    5139           0 :       __pyx_t_10 += 1;
    5140           0 :       __Pyx_GIVEREF(__pyx_kp_u__2);
    5141           0 :       PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u__2);
    5142           0 :       __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_5, 5, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 161, __pyx_L1_error)
    5143           0 :       __Pyx_GOTREF(__pyx_t_6);
    5144           0 :       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    5145           0 :       __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_6, 0, 0);
    5146           0 :       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    5147           0 :       __PYX_ERR(1, 161, __pyx_L1_error)
    5148             : 
    5149             :       /* "View.MemoryView":160
    5150             :  * 
    5151             :  *         for idx, dim in enumerate(shape):
    5152             :  *             if dim <= 0:             # <<<<<<<<<<<<<<
    5153             :  *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
    5154             :  *             self._shape[idx] = dim
    5155             :  */
    5156             :     }
    5157             : 
    5158             :     /* "View.MemoryView":162
    5159             :  *             if dim <= 0:
    5160             :  *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
    5161             :  *             self._shape[idx] = dim             # <<<<<<<<<<<<<<
    5162             :  * 
    5163             :  *         cdef char order
    5164             :  */
    5165           0 :     (__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim;
    5166             : 
    5167             :     /* "View.MemoryView":159
    5168             :  * 
    5169             :  * 
    5170             :  *         for idx, dim in enumerate(shape):             # <<<<<<<<<<<<<<
    5171             :  *             if dim <= 0:
    5172             :  *                 raise ValueError, f"Invalid shape in axis {idx}: {dim}."
    5173             :  */
    5174             :   }
    5175           0 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    5176             : 
    5177             :   /* "View.MemoryView":165
    5178             :  * 
    5179             :  *         cdef char order
    5180             :  *         if mode == 'c':             # <<<<<<<<<<<<<<
    5181             :  *             order = b'C'
    5182             :  *             self.mode = u'c'
    5183             :  */
    5184           0 :   __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_c, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 165, __pyx_L1_error)
    5185           0 :   if (__pyx_t_3) {
    5186             : 
    5187             :     /* "View.MemoryView":166
    5188             :  *         cdef char order
    5189             :  *         if mode == 'c':
    5190             :  *             order = b'C'             # <<<<<<<<<<<<<<
    5191             :  *             self.mode = u'c'
    5192             :  *         elif mode == 'fortran':
    5193             :  */
    5194           0 :     __pyx_v_order = 'C';
    5195             : 
    5196             :     /* "View.MemoryView":167
    5197             :  *         if mode == 'c':
    5198             :  *             order = b'C'
    5199             :  *             self.mode = u'c'             # <<<<<<<<<<<<<<
    5200             :  *         elif mode == 'fortran':
    5201             :  *             order = b'F'
    5202             :  */
    5203           0 :     __Pyx_INCREF(__pyx_n_u_c);
    5204           0 :     __Pyx_GIVEREF(__pyx_n_u_c);
    5205           0 :     __Pyx_GOTREF(__pyx_v_self->mode);
    5206           0 :     __Pyx_DECREF(__pyx_v_self->mode);
    5207           0 :     __pyx_v_self->mode = __pyx_n_u_c;
    5208             : 
    5209             :     /* "View.MemoryView":165
    5210             :  * 
    5211             :  *         cdef char order
    5212             :  *         if mode == 'c':             # <<<<<<<<<<<<<<
    5213             :  *             order = b'C'
    5214             :  *             self.mode = u'c'
    5215             :  */
    5216           0 :     goto __pyx_L11;
    5217             :   }
    5218             : 
    5219             :   /* "View.MemoryView":168
    5220             :  *             order = b'C'
    5221             :  *             self.mode = u'c'
    5222             :  *         elif mode == 'fortran':             # <<<<<<<<<<<<<<
    5223             :  *             order = b'F'
    5224             :  *             self.mode = u'fortran'
    5225             :  */
    5226           0 :   __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_fortran, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(1, 168, __pyx_L1_error)
    5227           0 :   if (likely(__pyx_t_3)) {
    5228             : 
    5229             :     /* "View.MemoryView":169
    5230             :  *             self.mode = u'c'
    5231             :  *         elif mode == 'fortran':
    5232             :  *             order = b'F'             # <<<<<<<<<<<<<<
    5233             :  *             self.mode = u'fortran'
    5234             :  *         else:
    5235             :  */
    5236           0 :     __pyx_v_order = 'F';
    5237             : 
    5238             :     /* "View.MemoryView":170
    5239             :  *         elif mode == 'fortran':
    5240             :  *             order = b'F'
    5241             :  *             self.mode = u'fortran'             # <<<<<<<<<<<<<<
    5242             :  *         else:
    5243             :  *             raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}"
    5244             :  */
    5245           0 :     __Pyx_INCREF(__pyx_n_u_fortran);
    5246           0 :     __Pyx_GIVEREF(__pyx_n_u_fortran);
    5247           0 :     __Pyx_GOTREF(__pyx_v_self->mode);
    5248           0 :     __Pyx_DECREF(__pyx_v_self->mode);
    5249           0 :     __pyx_v_self->mode = __pyx_n_u_fortran;
    5250             : 
    5251             :     /* "View.MemoryView":168
    5252             :  *             order = b'C'
    5253             :  *             self.mode = u'c'
    5254             :  *         elif mode == 'fortran':             # <<<<<<<<<<<<<<
    5255             :  *             order = b'F'
    5256             :  *             self.mode = u'fortran'
    5257             :  */
    5258           0 :     goto __pyx_L11;
    5259             :   }
    5260             : 
    5261             :   /* "View.MemoryView":172
    5262             :  *             self.mode = u'fortran'
    5263             :  *         else:
    5264             :  *             raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}"             # <<<<<<<<<<<<<<
    5265             :  * 
    5266             :  *         self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order)
    5267             :  */
    5268             :   /*else*/ {
    5269           0 :     __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_mode, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 172, __pyx_L1_error)
    5270           0 :     __Pyx_GOTREF(__pyx_t_4);
    5271           0 :     __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Invalid_mode_expected_c_or_fortr, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 172, __pyx_L1_error)
    5272           0 :     __Pyx_GOTREF(__pyx_t_6);
    5273           0 :     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    5274           0 :     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_6, 0, 0);
    5275           0 :     __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    5276           0 :     __PYX_ERR(1, 172, __pyx_L1_error)
    5277             :   }
    5278           0 :   __pyx_L11:;
    5279             : 
    5280             :   /* "View.MemoryView":174
    5281             :  *             raise ValueError, f"Invalid mode, expected 'c' or 'fortran', got {mode}"
    5282             :  * 
    5283             :  *         self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order)             # <<<<<<<<<<<<<<
    5284             :  * 
    5285             :  *         self.free_data = allocate_buffer
    5286             :  */
    5287           0 :   __pyx_v_self->len = __pyx_fill_contig_strides_array(__pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_itemsize, __pyx_v_self->ndim, __pyx_v_order);
    5288             : 
    5289             :   /* "View.MemoryView":176
    5290             :  *         self.len = fill_contig_strides_array(self._shape, self._strides, itemsize, self.ndim, order)
    5291             :  * 
    5292             :  *         self.free_data = allocate_buffer             # <<<<<<<<<<<<<<
    5293             :  *         self.dtype_is_object = format == b'O'
    5294             :  * 
    5295             :  */
    5296           0 :   __pyx_v_self->free_data = __pyx_v_allocate_buffer;
    5297             : 
    5298             :   /* "View.MemoryView":177
    5299             :  * 
    5300             :  *         self.free_data = allocate_buffer
    5301             :  *         self.dtype_is_object = format == b'O'             # <<<<<<<<<<<<<<
    5302             :  * 
    5303             :  *         if allocate_buffer:
    5304             :  */
    5305           0 :   __pyx_t_6 = PyObject_RichCompare(__pyx_v_format, __pyx_n_b_O, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 177, __pyx_L1_error)
    5306           0 :   __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 177, __pyx_L1_error)
    5307           0 :   __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    5308           0 :   __pyx_v_self->dtype_is_object = __pyx_t_3;
    5309             : 
    5310             :   /* "View.MemoryView":179
    5311             :  *         self.dtype_is_object = format == b'O'
    5312             :  * 
    5313             :  *         if allocate_buffer:             # <<<<<<<<<<<<<<
    5314             :  *             _allocate_buffer(self)
    5315             :  * 
    5316             :  */
    5317           0 :   if (__pyx_v_allocate_buffer) {
    5318             : 
    5319             :     /* "View.MemoryView":180
    5320             :  * 
    5321             :  *         if allocate_buffer:
    5322             :  *             _allocate_buffer(self)             # <<<<<<<<<<<<<<
    5323             :  * 
    5324             :  *     @cname('getbuffer')
    5325             :  */
    5326           0 :     __pyx_t_9 = __pyx_array_allocate_buffer(__pyx_v_self); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 180, __pyx_L1_error)
    5327             : 
    5328             :     /* "View.MemoryView":179
    5329             :  *         self.dtype_is_object = format == b'O'
    5330             :  * 
    5331             :  *         if allocate_buffer:             # <<<<<<<<<<<<<<
    5332             :  *             _allocate_buffer(self)
    5333             :  * 
    5334             :  */
    5335             :   }
    5336             : 
    5337             :   /* "View.MemoryView":131
    5338             :  *         cdef bint dtype_is_object
    5339             :  * 
    5340             :  *     def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,             # <<<<<<<<<<<<<<
    5341             :  *                   mode="c", bint allocate_buffer=True):
    5342             :  * 
    5343             :  */
    5344             : 
    5345             :   /* function exit code */
    5346           0 :   __pyx_r = 0;
    5347           0 :   goto __pyx_L0;
    5348           0 :   __pyx_L1_error:;
    5349           0 :   __Pyx_XDECREF(__pyx_t_4);
    5350           0 :   __Pyx_XDECREF(__pyx_t_5);
    5351           0 :   __Pyx_XDECREF(__pyx_t_6);
    5352           0 :   __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    5353           0 :   __pyx_r = -1;
    5354           0 :   __pyx_L0:;
    5355           0 :   __Pyx_XDECREF(__pyx_v_format);
    5356           0 :   __Pyx_RefNannyFinishContext();
    5357           0 :   return __pyx_r;
    5358             : }
    5359             : 
    5360             : /* "View.MemoryView":182
    5361             :  *             _allocate_buffer(self)
    5362             :  * 
    5363             :  *     @cname('getbuffer')             # <<<<<<<<<<<<<<
    5364             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
    5365             :  *         cdef int bufmode = -1
    5366             :  */
    5367             : 
    5368             : /* Python wrapper */
    5369             : CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
    5370           0 : CYTHON_UNUSED static int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
    5371           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    5372           0 :   int __pyx_r;
    5373             :   __Pyx_RefNannyDeclarations
    5374           0 :   __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
    5375           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    5376           0 :   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(((struct __pyx_array_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
    5377             : 
    5378             :   /* function exit code */
    5379           0 :   __Pyx_RefNannyFinishContext();
    5380           0 :   return __pyx_r;
    5381             : }
    5382             : 
    5383           0 : static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
    5384           0 :   int __pyx_v_bufmode;
    5385           0 :   int __pyx_r;
    5386             :   __Pyx_RefNannyDeclarations
    5387           0 :   int __pyx_t_1;
    5388           0 :   char *__pyx_t_2;
    5389           0 :   Py_ssize_t __pyx_t_3;
    5390           0 :   int __pyx_t_4;
    5391           0 :   Py_ssize_t *__pyx_t_5;
    5392           0 :   int __pyx_lineno = 0;
    5393           0 :   const char *__pyx_filename = NULL;
    5394           0 :   int __pyx_clineno = 0;
    5395           0 :   if (unlikely(__pyx_v_info == NULL)) {
    5396           0 :     PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
    5397           0 :     return -1;
    5398             :   }
    5399           0 :   __Pyx_RefNannySetupContext("__getbuffer__", 0);
    5400           0 :   __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
    5401           0 :   __Pyx_GIVEREF(__pyx_v_info->obj);
    5402             : 
    5403             :   /* "View.MemoryView":184
    5404             :  *     @cname('getbuffer')
    5405             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
    5406             :  *         cdef int bufmode = -1             # <<<<<<<<<<<<<<
    5407             :  *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
    5408             :  *             if self.mode == u"c":
    5409             :  */
    5410           0 :   __pyx_v_bufmode = -1;
    5411             : 
    5412             :   /* "View.MemoryView":185
    5413             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
    5414             :  *         cdef int bufmode = -1
    5415             :  *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):             # <<<<<<<<<<<<<<
    5416             :  *             if self.mode == u"c":
    5417             :  *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5418             :  */
    5419           0 :   __pyx_t_1 = ((__pyx_v_flags & ((PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS) | PyBUF_ANY_CONTIGUOUS)) != 0);
    5420           0 :   if (__pyx_t_1) {
    5421             : 
    5422             :     /* "View.MemoryView":186
    5423             :  *         cdef int bufmode = -1
    5424             :  *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
    5425             :  *             if self.mode == u"c":             # <<<<<<<<<<<<<<
    5426             :  *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5427             :  *             elif self.mode == u"fortran":
    5428             :  */
    5429           0 :     __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_c, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 186, __pyx_L1_error)
    5430           0 :     if (__pyx_t_1) {
    5431             : 
    5432             :       /* "View.MemoryView":187
    5433             :  *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
    5434             :  *             if self.mode == u"c":
    5435             :  *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS             # <<<<<<<<<<<<<<
    5436             :  *             elif self.mode == u"fortran":
    5437             :  *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5438             :  */
    5439           0 :       __pyx_v_bufmode = (PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
    5440             : 
    5441             :       /* "View.MemoryView":186
    5442             :  *         cdef int bufmode = -1
    5443             :  *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):
    5444             :  *             if self.mode == u"c":             # <<<<<<<<<<<<<<
    5445             :  *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5446             :  *             elif self.mode == u"fortran":
    5447             :  */
    5448           0 :       goto __pyx_L4;
    5449             :     }
    5450             : 
    5451             :     /* "View.MemoryView":188
    5452             :  *             if self.mode == u"c":
    5453             :  *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5454             :  *             elif self.mode == u"fortran":             # <<<<<<<<<<<<<<
    5455             :  *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5456             :  *             if not (flags & bufmode):
    5457             :  */
    5458           0 :     __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_fortran, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 188, __pyx_L1_error)
    5459           0 :     if (__pyx_t_1) {
    5460             : 
    5461             :       /* "View.MemoryView":189
    5462             :  *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5463             :  *             elif self.mode == u"fortran":
    5464             :  *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS             # <<<<<<<<<<<<<<
    5465             :  *             if not (flags & bufmode):
    5466             :  *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
    5467             :  */
    5468           0 :       __pyx_v_bufmode = (PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
    5469             : 
    5470             :       /* "View.MemoryView":188
    5471             :  *             if self.mode == u"c":
    5472             :  *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5473             :  *             elif self.mode == u"fortran":             # <<<<<<<<<<<<<<
    5474             :  *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5475             :  *             if not (flags & bufmode):
    5476             :  */
    5477             :     }
    5478           0 :     __pyx_L4:;
    5479             : 
    5480             :     /* "View.MemoryView":190
    5481             :  *             elif self.mode == u"fortran":
    5482             :  *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5483             :  *             if not (flags & bufmode):             # <<<<<<<<<<<<<<
    5484             :  *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
    5485             :  *         info.buf = self.data
    5486             :  */
    5487           0 :     __pyx_t_1 = (!((__pyx_v_flags & __pyx_v_bufmode) != 0));
    5488           0 :     if (unlikely(__pyx_t_1)) {
    5489             : 
    5490             :       /* "View.MemoryView":191
    5491             :  *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5492             :  *             if not (flags & bufmode):
    5493             :  *                 raise ValueError, "Can only create a buffer that is contiguous in memory."             # <<<<<<<<<<<<<<
    5494             :  *         info.buf = self.data
    5495             :  *         info.len = self.len
    5496             :  */
    5497           0 :       __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Can_only_create_a_buffer_that_is, 0, 0);
    5498           0 :       __PYX_ERR(1, 191, __pyx_L1_error)
    5499             : 
    5500             :       /* "View.MemoryView":190
    5501             :  *             elif self.mode == u"fortran":
    5502             :  *                 bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5503             :  *             if not (flags & bufmode):             # <<<<<<<<<<<<<<
    5504             :  *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
    5505             :  *         info.buf = self.data
    5506             :  */
    5507             :     }
    5508             : 
    5509             :     /* "View.MemoryView":185
    5510             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
    5511             :  *         cdef int bufmode = -1
    5512             :  *         if flags & (PyBUF_C_CONTIGUOUS | PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS):             # <<<<<<<<<<<<<<
    5513             :  *             if self.mode == u"c":
    5514             :  *                 bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
    5515             :  */
    5516             :   }
    5517             : 
    5518             :   /* "View.MemoryView":192
    5519             :  *             if not (flags & bufmode):
    5520             :  *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
    5521             :  *         info.buf = self.data             # <<<<<<<<<<<<<<
    5522             :  *         info.len = self.len
    5523             :  * 
    5524             :  */
    5525           0 :   __pyx_t_2 = __pyx_v_self->data;
    5526           0 :   __pyx_v_info->buf = __pyx_t_2;
    5527             : 
    5528             :   /* "View.MemoryView":193
    5529             :  *                 raise ValueError, "Can only create a buffer that is contiguous in memory."
    5530             :  *         info.buf = self.data
    5531             :  *         info.len = self.len             # <<<<<<<<<<<<<<
    5532             :  * 
    5533             :  *         if flags & PyBUF_STRIDES:
    5534             :  */
    5535           0 :   __pyx_t_3 = __pyx_v_self->len;
    5536           0 :   __pyx_v_info->len = __pyx_t_3;
    5537             : 
    5538             :   /* "View.MemoryView":195
    5539             :  *         info.len = self.len
    5540             :  * 
    5541             :  *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
    5542             :  *             info.ndim = self.ndim
    5543             :  *             info.shape = self._shape
    5544             :  */
    5545           0 :   __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
    5546           0 :   if (__pyx_t_1) {
    5547             : 
    5548             :     /* "View.MemoryView":196
    5549             :  * 
    5550             :  *         if flags & PyBUF_STRIDES:
    5551             :  *             info.ndim = self.ndim             # <<<<<<<<<<<<<<
    5552             :  *             info.shape = self._shape
    5553             :  *             info.strides = self._strides
    5554             :  */
    5555           0 :     __pyx_t_4 = __pyx_v_self->ndim;
    5556           0 :     __pyx_v_info->ndim = __pyx_t_4;
    5557             : 
    5558             :     /* "View.MemoryView":197
    5559             :  *         if flags & PyBUF_STRIDES:
    5560             :  *             info.ndim = self.ndim
    5561             :  *             info.shape = self._shape             # <<<<<<<<<<<<<<
    5562             :  *             info.strides = self._strides
    5563             :  *         else:
    5564             :  */
    5565           0 :     __pyx_t_5 = __pyx_v_self->_shape;
    5566           0 :     __pyx_v_info->shape = __pyx_t_5;
    5567             : 
    5568             :     /* "View.MemoryView":198
    5569             :  *             info.ndim = self.ndim
    5570             :  *             info.shape = self._shape
    5571             :  *             info.strides = self._strides             # <<<<<<<<<<<<<<
    5572             :  *         else:
    5573             :  *             info.ndim = 1
    5574             :  */
    5575           0 :     __pyx_t_5 = __pyx_v_self->_strides;
    5576           0 :     __pyx_v_info->strides = __pyx_t_5;
    5577             : 
    5578             :     /* "View.MemoryView":195
    5579             :  *         info.len = self.len
    5580             :  * 
    5581             :  *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
    5582             :  *             info.ndim = self.ndim
    5583             :  *             info.shape = self._shape
    5584             :  */
    5585           0 :     goto __pyx_L6;
    5586             :   }
    5587             : 
    5588             :   /* "View.MemoryView":200
    5589             :  *             info.strides = self._strides
    5590             :  *         else:
    5591             :  *             info.ndim = 1             # <<<<<<<<<<<<<<
    5592             :  *             info.shape = &self.len if flags & PyBUF_ND else NULL
    5593             :  *             info.strides = NULL
    5594             :  */
    5595             :   /*else*/ {
    5596           0 :     __pyx_v_info->ndim = 1;
    5597             : 
    5598             :     /* "View.MemoryView":201
    5599             :  *         else:
    5600             :  *             info.ndim = 1
    5601             :  *             info.shape = &self.len if flags & PyBUF_ND else NULL             # <<<<<<<<<<<<<<
    5602             :  *             info.strides = NULL
    5603             :  * 
    5604             :  */
    5605           0 :     __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
    5606           0 :     if (__pyx_t_1) {
    5607             :       __pyx_t_5 = (&__pyx_v_self->len);
    5608             :     } else {
    5609             :       __pyx_t_5 = NULL;
    5610             :     }
    5611           0 :     __pyx_v_info->shape = __pyx_t_5;
    5612             : 
    5613             :     /* "View.MemoryView":202
    5614             :  *             info.ndim = 1
    5615             :  *             info.shape = &self.len if flags & PyBUF_ND else NULL
    5616             :  *             info.strides = NULL             # <<<<<<<<<<<<<<
    5617             :  * 
    5618             :  *         info.suboffsets = NULL
    5619             :  */
    5620           0 :     __pyx_v_info->strides = NULL;
    5621             :   }
    5622           0 :   __pyx_L6:;
    5623             : 
    5624             :   /* "View.MemoryView":204
    5625             :  *             info.strides = NULL
    5626             :  * 
    5627             :  *         info.suboffsets = NULL             # <<<<<<<<<<<<<<
    5628             :  *         info.itemsize = self.itemsize
    5629             :  *         info.readonly = 0
    5630             :  */
    5631           0 :   __pyx_v_info->suboffsets = NULL;
    5632             : 
    5633             :   /* "View.MemoryView":205
    5634             :  * 
    5635             :  *         info.suboffsets = NULL
    5636             :  *         info.itemsize = self.itemsize             # <<<<<<<<<<<<<<
    5637             :  *         info.readonly = 0
    5638             :  *         info.format = self.format if flags & PyBUF_FORMAT else NULL
    5639             :  */
    5640           0 :   __pyx_t_3 = __pyx_v_self->itemsize;
    5641           0 :   __pyx_v_info->itemsize = __pyx_t_3;
    5642             : 
    5643             :   /* "View.MemoryView":206
    5644             :  *         info.suboffsets = NULL
    5645             :  *         info.itemsize = self.itemsize
    5646             :  *         info.readonly = 0             # <<<<<<<<<<<<<<
    5647             :  *         info.format = self.format if flags & PyBUF_FORMAT else NULL
    5648             :  *         info.obj = self
    5649             :  */
    5650           0 :   __pyx_v_info->readonly = 0;
    5651             : 
    5652             :   /* "View.MemoryView":207
    5653             :  *         info.itemsize = self.itemsize
    5654             :  *         info.readonly = 0
    5655             :  *         info.format = self.format if flags & PyBUF_FORMAT else NULL             # <<<<<<<<<<<<<<
    5656             :  *         info.obj = self
    5657             :  * 
    5658             :  */
    5659           0 :   __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
    5660           0 :   if (__pyx_t_1) {
    5661           0 :     __pyx_t_2 = __pyx_v_self->format;
    5662             :   } else {
    5663             :     __pyx_t_2 = NULL;
    5664             :   }
    5665           0 :   __pyx_v_info->format = __pyx_t_2;
    5666             : 
    5667             :   /* "View.MemoryView":208
    5668             :  *         info.readonly = 0
    5669             :  *         info.format = self.format if flags & PyBUF_FORMAT else NULL
    5670             :  *         info.obj = self             # <<<<<<<<<<<<<<
    5671             :  * 
    5672             :  *     def __dealloc__(array self):
    5673             :  */
    5674           0 :   __Pyx_INCREF((PyObject *)__pyx_v_self);
    5675           0 :   __Pyx_GIVEREF((PyObject *)__pyx_v_self);
    5676           0 :   __Pyx_GOTREF(__pyx_v_info->obj);
    5677           0 :   __Pyx_DECREF(__pyx_v_info->obj);
    5678           0 :   __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
    5679             : 
    5680             :   /* "View.MemoryView":182
    5681             :  *             _allocate_buffer(self)
    5682             :  * 
    5683             :  *     @cname('getbuffer')             # <<<<<<<<<<<<<<
    5684             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
    5685             :  *         cdef int bufmode = -1
    5686             :  */
    5687             : 
    5688             :   /* function exit code */
    5689           0 :   __pyx_r = 0;
    5690           0 :   goto __pyx_L0;
    5691           0 :   __pyx_L1_error:;
    5692           0 :   __Pyx_AddTraceback("View.MemoryView.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    5693           0 :   __pyx_r = -1;
    5694           0 :   if (__pyx_v_info->obj != NULL) {
    5695           0 :     __Pyx_GOTREF(__pyx_v_info->obj);
    5696           0 :     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
    5697             :   }
    5698           0 :   goto __pyx_L2;
    5699           0 :   __pyx_L0:;
    5700           0 :   if (__pyx_v_info->obj == Py_None) {
    5701           0 :     __Pyx_GOTREF(__pyx_v_info->obj);
    5702           0 :     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
    5703             :   }
    5704           0 :   __pyx_L2:;
    5705             :   __Pyx_RefNannyFinishContext();
    5706             :   return __pyx_r;
    5707             : }
    5708             : 
    5709             : /* "View.MemoryView":210
    5710             :  *         info.obj = self
    5711             :  * 
    5712             :  *     def __dealloc__(array self):             # <<<<<<<<<<<<<<
    5713             :  *         if self.callback_free_data != NULL:
    5714             :  *             self.callback_free_data(self.data)
    5715             :  */
    5716             : 
    5717             : /* Python wrapper */
    5718             : static void __pyx_array___dealloc__(PyObject *__pyx_v_self); /*proto*/
    5719           0 : static void __pyx_array___dealloc__(PyObject *__pyx_v_self) {
    5720           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    5721             :   __Pyx_RefNannyDeclarations
    5722           0 :   __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
    5723           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    5724           0 :   __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(((struct __pyx_array_obj *)__pyx_v_self));
    5725             : 
    5726             :   /* function exit code */
    5727           0 :   __Pyx_RefNannyFinishContext();
    5728             : }
    5729             : 
    5730           0 : static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self) {
    5731           0 :   int __pyx_t_1;
    5732           0 :   int __pyx_t_2;
    5733             : 
    5734             :   /* "View.MemoryView":211
    5735             :  * 
    5736             :  *     def __dealloc__(array self):
    5737             :  *         if self.callback_free_data != NULL:             # <<<<<<<<<<<<<<
    5738             :  *             self.callback_free_data(self.data)
    5739             :  *         elif self.free_data and self.data is not NULL:
    5740             :  */
    5741           0 :   __pyx_t_1 = (__pyx_v_self->callback_free_data != NULL);
    5742           0 :   if (__pyx_t_1) {
    5743             : 
    5744             :     /* "View.MemoryView":212
    5745             :  *     def __dealloc__(array self):
    5746             :  *         if self.callback_free_data != NULL:
    5747             :  *             self.callback_free_data(self.data)             # <<<<<<<<<<<<<<
    5748             :  *         elif self.free_data and self.data is not NULL:
    5749             :  *             if self.dtype_is_object:
    5750             :  */
    5751           0 :     __pyx_v_self->callback_free_data(__pyx_v_self->data);
    5752             : 
    5753             :     /* "View.MemoryView":211
    5754             :  * 
    5755             :  *     def __dealloc__(array self):
    5756             :  *         if self.callback_free_data != NULL:             # <<<<<<<<<<<<<<
    5757             :  *             self.callback_free_data(self.data)
    5758             :  *         elif self.free_data and self.data is not NULL:
    5759             :  */
    5760           0 :     goto __pyx_L3;
    5761             :   }
    5762             : 
    5763             :   /* "View.MemoryView":213
    5764             :  *         if self.callback_free_data != NULL:
    5765             :  *             self.callback_free_data(self.data)
    5766             :  *         elif self.free_data and self.data is not NULL:             # <<<<<<<<<<<<<<
    5767             :  *             if self.dtype_is_object:
    5768             :  *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
    5769             :  */
    5770           0 :   if (__pyx_v_self->free_data) {
    5771           0 :   } else {
    5772           0 :     __pyx_t_1 = __pyx_v_self->free_data;
    5773           0 :     goto __pyx_L4_bool_binop_done;
    5774             :   }
    5775           0 :   __pyx_t_2 = (__pyx_v_self->data != NULL);
    5776           0 :   __pyx_t_1 = __pyx_t_2;
    5777           0 :   __pyx_L4_bool_binop_done:;
    5778           0 :   if (__pyx_t_1) {
    5779             : 
    5780             :     /* "View.MemoryView":214
    5781             :  *             self.callback_free_data(self.data)
    5782             :  *         elif self.free_data and self.data is not NULL:
    5783             :  *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
    5784             :  *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
    5785             :  *             free(self.data)
    5786             :  */
    5787           0 :     if (__pyx_v_self->dtype_is_object) {
    5788             : 
    5789             :       /* "View.MemoryView":215
    5790             :  *         elif self.free_data and self.data is not NULL:
    5791             :  *             if self.dtype_is_object:
    5792             :  *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)             # <<<<<<<<<<<<<<
    5793             :  *             free(self.data)
    5794             :  *         PyObject_Free(self._shape)
    5795             :  */
    5796           0 :       __pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0);
    5797             : 
    5798             :       /* "View.MemoryView":214
    5799             :  *             self.callback_free_data(self.data)
    5800             :  *         elif self.free_data and self.data is not NULL:
    5801             :  *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
    5802             :  *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
    5803             :  *             free(self.data)
    5804             :  */
    5805             :     }
    5806             : 
    5807             :     /* "View.MemoryView":216
    5808             :  *             if self.dtype_is_object:
    5809             :  *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
    5810             :  *             free(self.data)             # <<<<<<<<<<<<<<
    5811             :  *         PyObject_Free(self._shape)
    5812             :  * 
    5813             :  */
    5814           0 :     free(__pyx_v_self->data);
    5815             : 
    5816             :     /* "View.MemoryView":213
    5817             :  *         if self.callback_free_data != NULL:
    5818             :  *             self.callback_free_data(self.data)
    5819             :  *         elif self.free_data and self.data is not NULL:             # <<<<<<<<<<<<<<
    5820             :  *             if self.dtype_is_object:
    5821             :  *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
    5822             :  */
    5823             :   }
    5824           0 :   __pyx_L3:;
    5825             : 
    5826             :   /* "View.MemoryView":217
    5827             :  *                 refcount_objects_in_slice(self.data, self._shape, self._strides, self.ndim, inc=False)
    5828             :  *             free(self.data)
    5829             :  *         PyObject_Free(self._shape)             # <<<<<<<<<<<<<<
    5830             :  * 
    5831             :  *     @property
    5832             :  */
    5833           0 :   PyObject_Free(__pyx_v_self->_shape);
    5834             : 
    5835             :   /* "View.MemoryView":210
    5836             :  *         info.obj = self
    5837             :  * 
    5838             :  *     def __dealloc__(array self):             # <<<<<<<<<<<<<<
    5839             :  *         if self.callback_free_data != NULL:
    5840             :  *             self.callback_free_data(self.data)
    5841             :  */
    5842             : 
    5843             :   /* function exit code */
    5844           0 : }
    5845             : 
    5846             : /* "View.MemoryView":219
    5847             :  *         PyObject_Free(self._shape)
    5848             :  * 
    5849             :  *     @property             # <<<<<<<<<<<<<<
    5850             :  *     def memview(self):
    5851             :  *         return self.get_memview()
    5852             :  */
    5853             : 
    5854             : /* Python wrapper */
    5855             : static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self); /*proto*/
    5856           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self) {
    5857           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    5858           0 :   PyObject *__pyx_r = 0;
    5859             :   __Pyx_RefNannyDeclarations
    5860           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
    5861           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    5862           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_5array_7memview___get__(((struct __pyx_array_obj *)__pyx_v_self));
    5863             : 
    5864             :   /* function exit code */
    5865           0 :   __Pyx_RefNannyFinishContext();
    5866           0 :   return __pyx_r;
    5867             : }
    5868             : 
    5869           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self) {
    5870           0 :   PyObject *__pyx_r = NULL;
    5871             :   __Pyx_RefNannyDeclarations
    5872           0 :   PyObject *__pyx_t_1 = NULL;
    5873           0 :   int __pyx_lineno = 0;
    5874           0 :   const char *__pyx_filename = NULL;
    5875           0 :   int __pyx_clineno = 0;
    5876           0 :   __Pyx_RefNannySetupContext("__get__", 1);
    5877             : 
    5878             :   /* "View.MemoryView":221
    5879             :  *     @property
    5880             :  *     def memview(self):
    5881             :  *         return self.get_memview()             # <<<<<<<<<<<<<<
    5882             :  * 
    5883             :  *     @cname('get_memview')
    5884             :  */
    5885           0 :   __Pyx_XDECREF(__pyx_r);
    5886           0 :   __pyx_t_1 = ((struct __pyx_vtabstruct_array *)__pyx_v_self->__pyx_vtab)->get_memview(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 221, __pyx_L1_error)
    5887           0 :   __Pyx_GOTREF(__pyx_t_1);
    5888           0 :   __pyx_r = __pyx_t_1;
    5889           0 :   __pyx_t_1 = 0;
    5890           0 :   goto __pyx_L0;
    5891             : 
    5892             :   /* "View.MemoryView":219
    5893             :  *         PyObject_Free(self._shape)
    5894             :  * 
    5895             :  *     @property             # <<<<<<<<<<<<<<
    5896             :  *     def memview(self):
    5897             :  *         return self.get_memview()
    5898             :  */
    5899             : 
    5900             :   /* function exit code */
    5901           0 :   __pyx_L1_error:;
    5902           0 :   __Pyx_XDECREF(__pyx_t_1);
    5903           0 :   __Pyx_AddTraceback("View.MemoryView.array.memview.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    5904           0 :   __pyx_r = NULL;
    5905           0 :   __pyx_L0:;
    5906           0 :   __Pyx_XGIVEREF(__pyx_r);
    5907           0 :   __Pyx_RefNannyFinishContext();
    5908           0 :   return __pyx_r;
    5909             : }
    5910             : 
    5911             : /* "View.MemoryView":224
    5912             :  * 
    5913             :  *     @cname('get_memview')
    5914             :  *     cdef get_memview(self):             # <<<<<<<<<<<<<<
    5915             :  *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
    5916             :  *         return  memoryview(self, flags, self.dtype_is_object)
    5917             :  */
    5918             : 
    5919           0 : static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) {
    5920           0 :   int __pyx_v_flags;
    5921           0 :   PyObject *__pyx_r = NULL;
    5922             :   __Pyx_RefNannyDeclarations
    5923           0 :   PyObject *__pyx_t_1 = NULL;
    5924           0 :   PyObject *__pyx_t_2 = NULL;
    5925           0 :   PyObject *__pyx_t_3 = NULL;
    5926           0 :   int __pyx_lineno = 0;
    5927           0 :   const char *__pyx_filename = NULL;
    5928           0 :   int __pyx_clineno = 0;
    5929           0 :   __Pyx_RefNannySetupContext("get_memview", 1);
    5930             : 
    5931             :   /* "View.MemoryView":225
    5932             :  *     @cname('get_memview')
    5933             :  *     cdef get_memview(self):
    5934             :  *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE             # <<<<<<<<<<<<<<
    5935             :  *         return  memoryview(self, flags, self.dtype_is_object)
    5936             :  * 
    5937             :  */
    5938           0 :   __pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS | PyBUF_FORMAT) | PyBUF_WRITABLE);
    5939             : 
    5940             :   /* "View.MemoryView":226
    5941             :  *     cdef get_memview(self):
    5942             :  *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
    5943             :  *         return  memoryview(self, flags, self.dtype_is_object)             # <<<<<<<<<<<<<<
    5944             :  * 
    5945             :  *     def __len__(self):
    5946             :  */
    5947           0 :   __Pyx_XDECREF(__pyx_r);
    5948           0 :   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 226, __pyx_L1_error)
    5949           0 :   __Pyx_GOTREF(__pyx_t_1);
    5950           0 :   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 226, __pyx_L1_error)
    5951           0 :   __Pyx_GOTREF(__pyx_t_2);
    5952           0 :   __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 226, __pyx_L1_error)
    5953           0 :   __Pyx_GOTREF(__pyx_t_3);
    5954           0 :   __Pyx_INCREF((PyObject *)__pyx_v_self);
    5955           0 :   __Pyx_GIVEREF((PyObject *)__pyx_v_self);
    5956           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self))) __PYX_ERR(1, 226, __pyx_L1_error);
    5957           0 :   __Pyx_GIVEREF(__pyx_t_1);
    5958           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 226, __pyx_L1_error);
    5959           0 :   __Pyx_GIVEREF(__pyx_t_2);
    5960           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2)) __PYX_ERR(1, 226, __pyx_L1_error);
    5961           0 :   __pyx_t_1 = 0;
    5962           0 :   __pyx_t_2 = 0;
    5963           0 :   __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 226, __pyx_L1_error)
    5964           0 :   __Pyx_GOTREF(__pyx_t_2);
    5965           0 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    5966           0 :   __pyx_r = __pyx_t_2;
    5967           0 :   __pyx_t_2 = 0;
    5968           0 :   goto __pyx_L0;
    5969             : 
    5970             :   /* "View.MemoryView":224
    5971             :  * 
    5972             :  *     @cname('get_memview')
    5973             :  *     cdef get_memview(self):             # <<<<<<<<<<<<<<
    5974             :  *         flags =  PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
    5975             :  *         return  memoryview(self, flags, self.dtype_is_object)
    5976             :  */
    5977             : 
    5978             :   /* function exit code */
    5979           0 :   __pyx_L1_error:;
    5980           0 :   __Pyx_XDECREF(__pyx_t_1);
    5981           0 :   __Pyx_XDECREF(__pyx_t_2);
    5982           0 :   __Pyx_XDECREF(__pyx_t_3);
    5983           0 :   __Pyx_AddTraceback("View.MemoryView.array.get_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
    5984           0 :   __pyx_r = 0;
    5985           0 :   __pyx_L0:;
    5986           0 :   __Pyx_XGIVEREF(__pyx_r);
    5987           0 :   __Pyx_RefNannyFinishContext();
    5988           0 :   return __pyx_r;
    5989             : }
    5990             : 
    5991             : /* "View.MemoryView":228
    5992             :  *         return  memoryview(self, flags, self.dtype_is_object)
    5993             :  * 
    5994             :  *     def __len__(self):             # <<<<<<<<<<<<<<
    5995             :  *         return self._shape[0]
    5996             :  * 
    5997             :  */
    5998             : 
    5999             : /* Python wrapper */
    6000             : static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self); /*proto*/
    6001           0 : static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) {
    6002           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    6003           0 :   Py_ssize_t __pyx_r;
    6004             :   __Pyx_RefNannyDeclarations
    6005           0 :   __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
    6006           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    6007           0 :   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(((struct __pyx_array_obj *)__pyx_v_self));
    6008             : 
    6009             :   /* function exit code */
    6010           0 :   __Pyx_RefNannyFinishContext();
    6011           0 :   return __pyx_r;
    6012             : }
    6013             : 
    6014           0 : static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self) {
    6015           0 :   Py_ssize_t __pyx_r;
    6016             : 
    6017             :   /* "View.MemoryView":229
    6018             :  * 
    6019             :  *     def __len__(self):
    6020             :  *         return self._shape[0]             # <<<<<<<<<<<<<<
    6021             :  * 
    6022             :  *     def __getattr__(self, attr):
    6023             :  */
    6024           0 :   __pyx_r = (__pyx_v_self->_shape[0]);
    6025           0 :   goto __pyx_L0;
    6026             : 
    6027             :   /* "View.MemoryView":228
    6028             :  *         return  memoryview(self, flags, self.dtype_is_object)
    6029             :  * 
    6030             :  *     def __len__(self):             # <<<<<<<<<<<<<<
    6031             :  *         return self._shape[0]
    6032             :  * 
    6033             :  */
    6034             : 
    6035             :   /* function exit code */
    6036           0 :   __pyx_L0:;
    6037           0 :   return __pyx_r;
    6038             : }
    6039             : 
    6040             : /* "View.MemoryView":231
    6041             :  *         return self._shape[0]
    6042             :  * 
    6043             :  *     def __getattr__(self, attr):             # <<<<<<<<<<<<<<
    6044             :  *         return getattr(self.memview, attr)
    6045             :  * 
    6046             :  */
    6047             : 
    6048             : /* Python wrapper */
    6049             : static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr); /*proto*/
    6050           0 : static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr) {
    6051           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    6052           0 :   PyObject *__pyx_r = 0;
    6053             :   __Pyx_RefNannyDeclarations
    6054           0 :   __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
    6055           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    6056           0 :   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_attr));
    6057             : 
    6058             :   /* function exit code */
    6059           0 :   __Pyx_RefNannyFinishContext();
    6060           0 :   return __pyx_r;
    6061             : }
    6062             : 
    6063           0 : static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr) {
    6064           0 :   PyObject *__pyx_r = NULL;
    6065             :   __Pyx_RefNannyDeclarations
    6066           0 :   PyObject *__pyx_t_1 = NULL;
    6067           0 :   PyObject *__pyx_t_2 = NULL;
    6068           0 :   int __pyx_lineno = 0;
    6069           0 :   const char *__pyx_filename = NULL;
    6070           0 :   int __pyx_clineno = 0;
    6071           0 :   __Pyx_RefNannySetupContext("__getattr__", 1);
    6072             : 
    6073             :   /* "View.MemoryView":232
    6074             :  * 
    6075             :  *     def __getattr__(self, attr):
    6076             :  *         return getattr(self.memview, attr)             # <<<<<<<<<<<<<<
    6077             :  * 
    6078             :  *     def __getitem__(self, item):
    6079             :  */
    6080           0 :   __Pyx_XDECREF(__pyx_r);
    6081           0 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 232, __pyx_L1_error)
    6082           0 :   __Pyx_GOTREF(__pyx_t_1);
    6083           0 :   __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_attr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 232, __pyx_L1_error)
    6084           0 :   __Pyx_GOTREF(__pyx_t_2);
    6085           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    6086           0 :   __pyx_r = __pyx_t_2;
    6087           0 :   __pyx_t_2 = 0;
    6088           0 :   goto __pyx_L0;
    6089             : 
    6090             :   /* "View.MemoryView":231
    6091             :  *         return self._shape[0]
    6092             :  * 
    6093             :  *     def __getattr__(self, attr):             # <<<<<<<<<<<<<<
    6094             :  *         return getattr(self.memview, attr)
    6095             :  * 
    6096             :  */
    6097             : 
    6098             :   /* function exit code */
    6099           0 :   __pyx_L1_error:;
    6100           0 :   __Pyx_XDECREF(__pyx_t_1);
    6101           0 :   __Pyx_XDECREF(__pyx_t_2);
    6102           0 :   __Pyx_AddTraceback("View.MemoryView.array.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6103           0 :   __pyx_r = NULL;
    6104           0 :   __pyx_L0:;
    6105           0 :   __Pyx_XGIVEREF(__pyx_r);
    6106           0 :   __Pyx_RefNannyFinishContext();
    6107           0 :   return __pyx_r;
    6108             : }
    6109             : 
    6110             : /* "View.MemoryView":234
    6111             :  *         return getattr(self.memview, attr)
    6112             :  * 
    6113             :  *     def __getitem__(self, item):             # <<<<<<<<<<<<<<
    6114             :  *         return self.memview[item]
    6115             :  * 
    6116             :  */
    6117             : 
    6118             : /* Python wrapper */
    6119             : static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
    6120           0 : static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
    6121           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    6122           0 :   PyObject *__pyx_r = 0;
    6123             :   __Pyx_RefNannyDeclarations
    6124           0 :   __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
    6125           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    6126           0 :   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item));
    6127             : 
    6128             :   /* function exit code */
    6129           0 :   __Pyx_RefNannyFinishContext();
    6130           0 :   return __pyx_r;
    6131             : }
    6132             : 
    6133           0 : static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item) {
    6134           0 :   PyObject *__pyx_r = NULL;
    6135             :   __Pyx_RefNannyDeclarations
    6136           0 :   PyObject *__pyx_t_1 = NULL;
    6137           0 :   PyObject *__pyx_t_2 = NULL;
    6138           0 :   int __pyx_lineno = 0;
    6139           0 :   const char *__pyx_filename = NULL;
    6140           0 :   int __pyx_clineno = 0;
    6141           0 :   __Pyx_RefNannySetupContext("__getitem__", 1);
    6142             : 
    6143             :   /* "View.MemoryView":235
    6144             :  * 
    6145             :  *     def __getitem__(self, item):
    6146             :  *         return self.memview[item]             # <<<<<<<<<<<<<<
    6147             :  * 
    6148             :  *     def __setitem__(self, item, value):
    6149             :  */
    6150           0 :   __Pyx_XDECREF(__pyx_r);
    6151           0 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 235, __pyx_L1_error)
    6152           0 :   __Pyx_GOTREF(__pyx_t_1);
    6153           0 :   __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 235, __pyx_L1_error)
    6154           0 :   __Pyx_GOTREF(__pyx_t_2);
    6155           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    6156           0 :   __pyx_r = __pyx_t_2;
    6157           0 :   __pyx_t_2 = 0;
    6158           0 :   goto __pyx_L0;
    6159             : 
    6160             :   /* "View.MemoryView":234
    6161             :  *         return getattr(self.memview, attr)
    6162             :  * 
    6163             :  *     def __getitem__(self, item):             # <<<<<<<<<<<<<<
    6164             :  *         return self.memview[item]
    6165             :  * 
    6166             :  */
    6167             : 
    6168             :   /* function exit code */
    6169           0 :   __pyx_L1_error:;
    6170           0 :   __Pyx_XDECREF(__pyx_t_1);
    6171           0 :   __Pyx_XDECREF(__pyx_t_2);
    6172           0 :   __Pyx_AddTraceback("View.MemoryView.array.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6173           0 :   __pyx_r = NULL;
    6174           0 :   __pyx_L0:;
    6175           0 :   __Pyx_XGIVEREF(__pyx_r);
    6176           0 :   __Pyx_RefNannyFinishContext();
    6177           0 :   return __pyx_r;
    6178             : }
    6179             : 
    6180             : /* "View.MemoryView":237
    6181             :  *         return self.memview[item]
    6182             :  * 
    6183             :  *     def __setitem__(self, item, value):             # <<<<<<<<<<<<<<
    6184             :  *         self.memview[item] = value
    6185             :  * 
    6186             :  */
    6187             : 
    6188             : /* Python wrapper */
    6189             : static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /*proto*/
    6190           0 : static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
    6191           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    6192           0 :   int __pyx_r;
    6193             :   __Pyx_RefNannyDeclarations
    6194           0 :   __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
    6195           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    6196           0 :   __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item), ((PyObject *)__pyx_v_value));
    6197             : 
    6198             :   /* function exit code */
    6199           0 :   __Pyx_RefNannyFinishContext();
    6200           0 :   return __pyx_r;
    6201             : }
    6202             : 
    6203           0 : static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
    6204           0 :   int __pyx_r;
    6205             :   __Pyx_RefNannyDeclarations
    6206           0 :   PyObject *__pyx_t_1 = NULL;
    6207           0 :   int __pyx_lineno = 0;
    6208           0 :   const char *__pyx_filename = NULL;
    6209           0 :   int __pyx_clineno = 0;
    6210           0 :   __Pyx_RefNannySetupContext("__setitem__", 1);
    6211             : 
    6212             :   /* "View.MemoryView":238
    6213             :  * 
    6214             :  *     def __setitem__(self, item, value):
    6215             :  *         self.memview[item] = value             # <<<<<<<<<<<<<<
    6216             :  * 
    6217             :  * 
    6218             :  */
    6219           0 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 238, __pyx_L1_error)
    6220           0 :   __Pyx_GOTREF(__pyx_t_1);
    6221           0 :   if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0))) __PYX_ERR(1, 238, __pyx_L1_error)
    6222           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    6223             : 
    6224             :   /* "View.MemoryView":237
    6225             :  *         return self.memview[item]
    6226             :  * 
    6227             :  *     def __setitem__(self, item, value):             # <<<<<<<<<<<<<<
    6228             :  *         self.memview[item] = value
    6229             :  * 
    6230             :  */
    6231             : 
    6232             :   /* function exit code */
    6233           0 :   __pyx_r = 0;
    6234           0 :   goto __pyx_L0;
    6235           0 :   __pyx_L1_error:;
    6236           0 :   __Pyx_XDECREF(__pyx_t_1);
    6237           0 :   __Pyx_AddTraceback("View.MemoryView.array.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6238           0 :   __pyx_r = -1;
    6239           0 :   __pyx_L0:;
    6240           0 :   __Pyx_RefNannyFinishContext();
    6241           0 :   return __pyx_r;
    6242             : }
    6243             : 
    6244             : /* "(tree fragment)":1
    6245             :  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
    6246             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
    6247             :  * def __setstate_cython__(self, __pyx_state):
    6248             :  */
    6249             : 
    6250             : /* Python wrapper */
    6251             : static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, 
    6252             : #if CYTHON_METH_FASTCALL
    6253             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    6254             : #else
    6255             : PyObject *__pyx_args, PyObject *__pyx_kwds
    6256             : #endif
    6257             : ); /*proto*/
    6258           0 : static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, 
    6259             : #if CYTHON_METH_FASTCALL
    6260             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    6261             : #else
    6262             : PyObject *__pyx_args, PyObject *__pyx_kwds
    6263             : #endif
    6264             : ) {
    6265             :   #if !CYTHON_METH_FASTCALL
    6266             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
    6267             :   #endif
    6268           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    6269           0 :   PyObject *__pyx_r = 0;
    6270             :   __Pyx_RefNannyDeclarations
    6271           0 :   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
    6272             :   #if !CYTHON_METH_FASTCALL
    6273             :   #if CYTHON_ASSUME_SAFE_MACROS
    6274             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
    6275             :   #else
    6276             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
    6277             :   #endif
    6278             :   #endif
    6279           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
    6280           0 :   if (unlikely(__pyx_nargs > 0)) {
    6281           0 :     __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
    6282           0 :   if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
    6283           0 :   __pyx_r = __pyx_pf___pyx_array___reduce_cython__(((struct __pyx_array_obj *)__pyx_v_self));
    6284             : 
    6285             :   /* function exit code */
    6286           0 :   __Pyx_RefNannyFinishContext();
    6287           0 :   return __pyx_r;
    6288             : }
    6289             : 
    6290           0 : static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self) {
    6291           0 :   PyObject *__pyx_r = NULL;
    6292             :   __Pyx_RefNannyDeclarations
    6293           0 :   int __pyx_lineno = 0;
    6294           0 :   const char *__pyx_filename = NULL;
    6295           0 :   int __pyx_clineno = 0;
    6296           0 :   __Pyx_RefNannySetupContext("__reduce_cython__", 1);
    6297             : 
    6298             :   /* "(tree fragment)":2
    6299             :  * def __reduce_cython__(self):
    6300             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
    6301             :  * def __setstate_cython__(self, __pyx_state):
    6302             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
    6303             :  */
    6304           0 :   __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
    6305           0 :   __PYX_ERR(1, 2, __pyx_L1_error)
    6306             : 
    6307             :   /* "(tree fragment)":1
    6308             :  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
    6309             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
    6310             :  * def __setstate_cython__(self, __pyx_state):
    6311             :  */
    6312             : 
    6313             :   /* function exit code */
    6314           0 :   __pyx_L1_error:;
    6315           0 :   __Pyx_AddTraceback("View.MemoryView.array.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6316           0 :   __pyx_r = NULL;
    6317           0 :   __Pyx_XGIVEREF(__pyx_r);
    6318           0 :   __Pyx_RefNannyFinishContext();
    6319           0 :   return __pyx_r;
    6320             : }
    6321             : 
    6322             : /* "(tree fragment)":3
    6323             :  * def __reduce_cython__(self):
    6324             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
    6325             :  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
    6326             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
    6327             :  */
    6328             : 
    6329             : /* Python wrapper */
    6330             : static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, 
    6331             : #if CYTHON_METH_FASTCALL
    6332             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    6333             : #else
    6334             : PyObject *__pyx_args, PyObject *__pyx_kwds
    6335             : #endif
    6336             : ); /*proto*/
    6337           0 : static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, 
    6338             : #if CYTHON_METH_FASTCALL
    6339             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    6340             : #else
    6341             : PyObject *__pyx_args, PyObject *__pyx_kwds
    6342             : #endif
    6343             : ) {
    6344           0 :   CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
    6345             :   #if !CYTHON_METH_FASTCALL
    6346             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
    6347             :   #endif
    6348           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    6349           0 :   PyObject* values[1] = {0};
    6350           0 :   int __pyx_lineno = 0;
    6351           0 :   const char *__pyx_filename = NULL;
    6352           0 :   int __pyx_clineno = 0;
    6353           0 :   PyObject *__pyx_r = 0;
    6354             :   __Pyx_RefNannyDeclarations
    6355           0 :   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
    6356             :   #if !CYTHON_METH_FASTCALL
    6357             :   #if CYTHON_ASSUME_SAFE_MACROS
    6358             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
    6359             :   #else
    6360             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
    6361             :   #endif
    6362             :   #endif
    6363           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
    6364             :   {
    6365           0 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    6366           0 :     if (__pyx_kwds) {
    6367           0 :       Py_ssize_t kw_args;
    6368           0 :       switch (__pyx_nargs) {
    6369           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    6370           0 :         CYTHON_FALLTHROUGH;
    6371           0 :         case  0: break;
    6372           0 :         default: goto __pyx_L5_argtuple_error;
    6373             :       }
    6374           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
    6375           0 :       switch (__pyx_nargs) {
    6376             :         case  0:
    6377           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
    6378           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
    6379           0 :           kw_args--;
    6380             :         }
    6381           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
    6382           0 :         else goto __pyx_L5_argtuple_error;
    6383             :       }
    6384           0 :       if (unlikely(kw_args > 0)) {
    6385           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
    6386           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
    6387             :       }
    6388           0 :     } else if (unlikely(__pyx_nargs != 1)) {
    6389           0 :       goto __pyx_L5_argtuple_error;
    6390             :     } else {
    6391           0 :       values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    6392             :     }
    6393           0 :     __pyx_v___pyx_state = values[0];
    6394             :   }
    6395           0 :   goto __pyx_L6_skip;
    6396           0 :   __pyx_L5_argtuple_error:;
    6397           0 :   __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
    6398           0 :   __pyx_L6_skip:;
    6399           0 :   goto __pyx_L4_argument_unpacking_done;
    6400           0 :   __pyx_L3_error:;
    6401             :   {
    6402           0 :     Py_ssize_t __pyx_temp;
    6403           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    6404             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    6405             :     }
    6406             :   }
    6407           0 :   __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6408           0 :   __Pyx_RefNannyFinishContext();
    6409           0 :   return NULL;
    6410           0 :   __pyx_L4_argument_unpacking_done:;
    6411           0 :   __pyx_r = __pyx_pf___pyx_array_2__setstate_cython__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v___pyx_state);
    6412             : 
    6413             :   /* function exit code */
    6414             :   {
    6415           0 :     Py_ssize_t __pyx_temp;
    6416           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    6417             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    6418             :     }
    6419             :   }
    6420             :   __Pyx_RefNannyFinishContext();
    6421             :   return __pyx_r;
    6422             : }
    6423             : 
    6424           0 : static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
    6425           0 :   PyObject *__pyx_r = NULL;
    6426             :   __Pyx_RefNannyDeclarations
    6427           0 :   int __pyx_lineno = 0;
    6428           0 :   const char *__pyx_filename = NULL;
    6429           0 :   int __pyx_clineno = 0;
    6430           0 :   __Pyx_RefNannySetupContext("__setstate_cython__", 1);
    6431             : 
    6432             :   /* "(tree fragment)":4
    6433             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
    6434             :  * def __setstate_cython__(self, __pyx_state):
    6435             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
    6436             :  */
    6437           0 :   __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
    6438           0 :   __PYX_ERR(1, 4, __pyx_L1_error)
    6439             : 
    6440             :   /* "(tree fragment)":3
    6441             :  * def __reduce_cython__(self):
    6442             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
    6443             :  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
    6444             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
    6445             :  */
    6446             : 
    6447             :   /* function exit code */
    6448           0 :   __pyx_L1_error:;
    6449           0 :   __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6450           0 :   __pyx_r = NULL;
    6451           0 :   __Pyx_XGIVEREF(__pyx_r);
    6452           0 :   __Pyx_RefNannyFinishContext();
    6453           0 :   return __pyx_r;
    6454             : }
    6455             : 
    6456             : /* "View.MemoryView":248
    6457             :  * 
    6458             :  * @cname("__pyx_array_allocate_buffer")
    6459             :  * cdef int _allocate_buffer(array self) except -1:             # <<<<<<<<<<<<<<
    6460             :  * 
    6461             :  * 
    6462             :  */
    6463             : 
    6464           0 : static int __pyx_array_allocate_buffer(struct __pyx_array_obj *__pyx_v_self) {
    6465           0 :   Py_ssize_t __pyx_v_i;
    6466           0 :   PyObject **__pyx_v_p;
    6467           0 :   int __pyx_r;
    6468           0 :   int __pyx_t_1;
    6469           0 :   Py_ssize_t __pyx_t_2;
    6470           0 :   Py_ssize_t __pyx_t_3;
    6471           0 :   Py_ssize_t __pyx_t_4;
    6472           0 :   int __pyx_lineno = 0;
    6473           0 :   const char *__pyx_filename = NULL;
    6474           0 :   int __pyx_clineno = 0;
    6475             : 
    6476             :   /* "View.MemoryView":254
    6477             :  *     cdef PyObject **p
    6478             :  * 
    6479             :  *     self.free_data = True             # <<<<<<<<<<<<<<
    6480             :  *     self.data = <char *>malloc(self.len)
    6481             :  *     if not self.data:
    6482             :  */
    6483           0 :   __pyx_v_self->free_data = 1;
    6484             : 
    6485             :   /* "View.MemoryView":255
    6486             :  * 
    6487             :  *     self.free_data = True
    6488             :  *     self.data = <char *>malloc(self.len)             # <<<<<<<<<<<<<<
    6489             :  *     if not self.data:
    6490             :  *         raise MemoryError, "unable to allocate array data."
    6491             :  */
    6492           0 :   __pyx_v_self->data = ((char *)malloc(__pyx_v_self->len));
    6493             : 
    6494             :   /* "View.MemoryView":256
    6495             :  *     self.free_data = True
    6496             :  *     self.data = <char *>malloc(self.len)
    6497             :  *     if not self.data:             # <<<<<<<<<<<<<<
    6498             :  *         raise MemoryError, "unable to allocate array data."
    6499             :  * 
    6500             :  */
    6501           0 :   __pyx_t_1 = (!(__pyx_v_self->data != 0));
    6502           0 :   if (unlikely(__pyx_t_1)) {
    6503             : 
    6504             :     /* "View.MemoryView":257
    6505             :  *     self.data = <char *>malloc(self.len)
    6506             :  *     if not self.data:
    6507             :  *         raise MemoryError, "unable to allocate array data."             # <<<<<<<<<<<<<<
    6508             :  * 
    6509             :  *     if self.dtype_is_object:
    6510             :  */
    6511           0 :     __Pyx_Raise(__pyx_builtin_MemoryError, __pyx_kp_s_unable_to_allocate_array_data, 0, 0);
    6512           0 :     __PYX_ERR(1, 257, __pyx_L1_error)
    6513             : 
    6514             :     /* "View.MemoryView":256
    6515             :  *     self.free_data = True
    6516             :  *     self.data = <char *>malloc(self.len)
    6517             :  *     if not self.data:             # <<<<<<<<<<<<<<
    6518             :  *         raise MemoryError, "unable to allocate array data."
    6519             :  * 
    6520             :  */
    6521             :   }
    6522             : 
    6523             :   /* "View.MemoryView":259
    6524             :  *         raise MemoryError, "unable to allocate array data."
    6525             :  * 
    6526             :  *     if self.dtype_is_object:             # <<<<<<<<<<<<<<
    6527             :  *         p = <PyObject **> self.data
    6528             :  *         for i in range(self.len // self.itemsize):
    6529             :  */
    6530           0 :   if (__pyx_v_self->dtype_is_object) {
    6531             : 
    6532             :     /* "View.MemoryView":260
    6533             :  * 
    6534             :  *     if self.dtype_is_object:
    6535             :  *         p = <PyObject **> self.data             # <<<<<<<<<<<<<<
    6536             :  *         for i in range(self.len // self.itemsize):
    6537             :  *             p[i] = Py_None
    6538             :  */
    6539           0 :     __pyx_v_p = ((PyObject **)__pyx_v_self->data);
    6540             : 
    6541             :     /* "View.MemoryView":261
    6542             :  *     if self.dtype_is_object:
    6543             :  *         p = <PyObject **> self.data
    6544             :  *         for i in range(self.len // self.itemsize):             # <<<<<<<<<<<<<<
    6545             :  *             p[i] = Py_None
    6546             :  *             Py_INCREF(Py_None)
    6547             :  */
    6548           0 :     if (unlikely(__pyx_v_self->itemsize == 0)) {
    6549           0 :       PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    6550           0 :       __PYX_ERR(1, 261, __pyx_L1_error)
    6551             :     }
    6552           0 :     else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_self->itemsize == (Py_ssize_t)-1)  && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->len))) {
    6553           0 :       PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
    6554           0 :       __PYX_ERR(1, 261, __pyx_L1_error)
    6555             :     }
    6556           0 :     __pyx_t_2 = __Pyx_div_Py_ssize_t(__pyx_v_self->len, __pyx_v_self->itemsize);
    6557           0 :     __pyx_t_3 = __pyx_t_2;
    6558           0 :     for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    6559           0 :       __pyx_v_i = __pyx_t_4;
    6560             : 
    6561             :       /* "View.MemoryView":262
    6562             :  *         p = <PyObject **> self.data
    6563             :  *         for i in range(self.len // self.itemsize):
    6564             :  *             p[i] = Py_None             # <<<<<<<<<<<<<<
    6565             :  *             Py_INCREF(Py_None)
    6566             :  *     return 0
    6567             :  */
    6568           0 :       (__pyx_v_p[__pyx_v_i]) = Py_None;
    6569             : 
    6570             :       /* "View.MemoryView":263
    6571             :  *         for i in range(self.len // self.itemsize):
    6572             :  *             p[i] = Py_None
    6573             :  *             Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
    6574             :  *     return 0
    6575             :  * 
    6576             :  */
    6577           0 :       Py_INCREF(Py_None);
    6578             :     }
    6579             : 
    6580             :     /* "View.MemoryView":259
    6581             :  *         raise MemoryError, "unable to allocate array data."
    6582             :  * 
    6583             :  *     if self.dtype_is_object:             # <<<<<<<<<<<<<<
    6584             :  *         p = <PyObject **> self.data
    6585             :  *         for i in range(self.len // self.itemsize):
    6586             :  */
    6587             :   }
    6588             : 
    6589             :   /* "View.MemoryView":264
    6590             :  *             p[i] = Py_None
    6591             :  *             Py_INCREF(Py_None)
    6592             :  *     return 0             # <<<<<<<<<<<<<<
    6593             :  * 
    6594             :  * 
    6595             :  */
    6596           0 :   __pyx_r = 0;
    6597           0 :   goto __pyx_L0;
    6598             : 
    6599             :   /* "View.MemoryView":248
    6600             :  * 
    6601             :  * @cname("__pyx_array_allocate_buffer")
    6602             :  * cdef int _allocate_buffer(array self) except -1:             # <<<<<<<<<<<<<<
    6603             :  * 
    6604             :  * 
    6605             :  */
    6606             : 
    6607             :   /* function exit code */
    6608           0 :   __pyx_L1_error:;
    6609           0 :   __Pyx_AddTraceback("View.MemoryView._allocate_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6610           0 :   __pyx_r = -1;
    6611           0 :   __pyx_L0:;
    6612           0 :   return __pyx_r;
    6613             : }
    6614             : 
    6615             : /* "View.MemoryView":268
    6616             :  * 
    6617             :  * @cname("__pyx_array_new")
    6618             :  * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, char *c_mode, char *buf):             # <<<<<<<<<<<<<<
    6619             :  *     cdef array result
    6620             :  *     cdef str mode = "fortran" if c_mode[0] == b'f' else "c"  # this often comes from a constant C string.
    6621             :  */
    6622             : 
    6623           0 : static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, char *__pyx_v_format, char *__pyx_v_c_mode, char *__pyx_v_buf) {
    6624           0 :   struct __pyx_array_obj *__pyx_v_result = 0;
    6625           0 :   PyObject *__pyx_v_mode = 0;
    6626           0 :   struct __pyx_array_obj *__pyx_r = NULL;
    6627             :   __Pyx_RefNannyDeclarations
    6628           0 :   PyObject *__pyx_t_1 = NULL;
    6629           0 :   int __pyx_t_2;
    6630           0 :   PyObject *__pyx_t_3 = NULL;
    6631           0 :   PyObject *__pyx_t_4 = NULL;
    6632           0 :   int __pyx_lineno = 0;
    6633           0 :   const char *__pyx_filename = NULL;
    6634           0 :   int __pyx_clineno = 0;
    6635           0 :   __Pyx_RefNannySetupContext("array_cwrapper", 1);
    6636             : 
    6637             :   /* "View.MemoryView":270
    6638             :  * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, char *c_mode, char *buf):
    6639             :  *     cdef array result
    6640             :  *     cdef str mode = "fortran" if c_mode[0] == b'f' else "c"  # this often comes from a constant C string.             # <<<<<<<<<<<<<<
    6641             :  * 
    6642             :  *     if buf is NULL:
    6643             :  */
    6644           0 :   __pyx_t_2 = ((__pyx_v_c_mode[0]) == 'f');
    6645           0 :   if (__pyx_t_2) {
    6646           0 :     __Pyx_INCREF(__pyx_n_s_fortran);
    6647             :     __pyx_t_1 = __pyx_n_s_fortran;
    6648             :   } else {
    6649           0 :     __Pyx_INCREF(__pyx_n_s_c);
    6650             :     __pyx_t_1 = __pyx_n_s_c;
    6651             :   }
    6652           0 :   __pyx_v_mode = ((PyObject*)__pyx_t_1);
    6653           0 :   __pyx_t_1 = 0;
    6654             : 
    6655             :   /* "View.MemoryView":272
    6656             :  *     cdef str mode = "fortran" if c_mode[0] == b'f' else "c"  # this often comes from a constant C string.
    6657             :  * 
    6658             :  *     if buf is NULL:             # <<<<<<<<<<<<<<
    6659             :  *         result = array.__new__(array, shape, itemsize, format, mode)
    6660             :  *     else:
    6661             :  */
    6662           0 :   __pyx_t_2 = (__pyx_v_buf == NULL);
    6663           0 :   if (__pyx_t_2) {
    6664             : 
    6665             :     /* "View.MemoryView":273
    6666             :  * 
    6667             :  *     if buf is NULL:
    6668             :  *         result = array.__new__(array, shape, itemsize, format, mode)             # <<<<<<<<<<<<<<
    6669             :  *     else:
    6670             :  *         result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False)
    6671             :  */
    6672           0 :     __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 273, __pyx_L1_error)
    6673           0 :     __Pyx_GOTREF(__pyx_t_1);
    6674           0 :     __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 273, __pyx_L1_error)
    6675           0 :     __Pyx_GOTREF(__pyx_t_3);
    6676           0 :     __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 273, __pyx_L1_error)
    6677           0 :     __Pyx_GOTREF(__pyx_t_4);
    6678           0 :     __Pyx_INCREF(__pyx_v_shape);
    6679           0 :     __Pyx_GIVEREF(__pyx_v_shape);
    6680           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_shape)) __PYX_ERR(1, 273, __pyx_L1_error);
    6681           0 :     __Pyx_GIVEREF(__pyx_t_1);
    6682           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(1, 273, __pyx_L1_error);
    6683           0 :     __Pyx_GIVEREF(__pyx_t_3);
    6684           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3)) __PYX_ERR(1, 273, __pyx_L1_error);
    6685           0 :     __Pyx_INCREF(__pyx_v_mode);
    6686           0 :     __Pyx_GIVEREF(__pyx_v_mode);
    6687           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_mode)) __PYX_ERR(1, 273, __pyx_L1_error);
    6688           0 :     __pyx_t_1 = 0;
    6689           0 :     __pyx_t_3 = 0;
    6690           0 :     __pyx_t_3 = ((PyObject *)__pyx_tp_new_array(((PyTypeObject *)__pyx_array_type), __pyx_t_4, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 273, __pyx_L1_error)
    6691           0 :     __Pyx_GOTREF((PyObject *)__pyx_t_3);
    6692           0 :     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    6693           0 :     __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_3);
    6694           0 :     __pyx_t_3 = 0;
    6695             : 
    6696             :     /* "View.MemoryView":272
    6697             :  *     cdef str mode = "fortran" if c_mode[0] == b'f' else "c"  # this often comes from a constant C string.
    6698             :  * 
    6699             :  *     if buf is NULL:             # <<<<<<<<<<<<<<
    6700             :  *         result = array.__new__(array, shape, itemsize, format, mode)
    6701             :  *     else:
    6702             :  */
    6703           0 :     goto __pyx_L3;
    6704             :   }
    6705             : 
    6706             :   /* "View.MemoryView":275
    6707             :  *         result = array.__new__(array, shape, itemsize, format, mode)
    6708             :  *     else:
    6709             :  *         result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False)             # <<<<<<<<<<<<<<
    6710             :  *         result.data = buf
    6711             :  * 
    6712             :  */
    6713             :   /*else*/ {
    6714           0 :     __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 275, __pyx_L1_error)
    6715           0 :     __Pyx_GOTREF(__pyx_t_3);
    6716           0 :     __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 275, __pyx_L1_error)
    6717           0 :     __Pyx_GOTREF(__pyx_t_4);
    6718           0 :     __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 275, __pyx_L1_error)
    6719           0 :     __Pyx_GOTREF(__pyx_t_1);
    6720           0 :     __Pyx_INCREF(__pyx_v_shape);
    6721           0 :     __Pyx_GIVEREF(__pyx_v_shape);
    6722           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_shape)) __PYX_ERR(1, 275, __pyx_L1_error);
    6723           0 :     __Pyx_GIVEREF(__pyx_t_3);
    6724           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3)) __PYX_ERR(1, 275, __pyx_L1_error);
    6725           0 :     __Pyx_GIVEREF(__pyx_t_4);
    6726           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_4)) __PYX_ERR(1, 275, __pyx_L1_error);
    6727           0 :     __Pyx_INCREF(__pyx_v_mode);
    6728           0 :     __Pyx_GIVEREF(__pyx_v_mode);
    6729           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_mode)) __PYX_ERR(1, 275, __pyx_L1_error);
    6730           0 :     __pyx_t_3 = 0;
    6731           0 :     __pyx_t_4 = 0;
    6732           0 :     __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 275, __pyx_L1_error)
    6733           0 :     __Pyx_GOTREF(__pyx_t_4);
    6734           0 :     if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(1, 275, __pyx_L1_error)
    6735           0 :     __pyx_t_3 = ((PyObject *)__pyx_tp_new_array(((PyTypeObject *)__pyx_array_type), __pyx_t_1, __pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 275, __pyx_L1_error)
    6736           0 :     __Pyx_GOTREF((PyObject *)__pyx_t_3);
    6737           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    6738           0 :     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    6739           0 :     __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_3);
    6740           0 :     __pyx_t_3 = 0;
    6741             : 
    6742             :     /* "View.MemoryView":276
    6743             :  *     else:
    6744             :  *         result = array.__new__(array, shape, itemsize, format, mode, allocate_buffer=False)
    6745             :  *         result.data = buf             # <<<<<<<<<<<<<<
    6746             :  * 
    6747             :  *     return result
    6748             :  */
    6749           0 :     __pyx_v_result->data = __pyx_v_buf;
    6750             :   }
    6751           0 :   __pyx_L3:;
    6752             : 
    6753             :   /* "View.MemoryView":278
    6754             :  *         result.data = buf
    6755             :  * 
    6756             :  *     return result             # <<<<<<<<<<<<<<
    6757             :  * 
    6758             :  * 
    6759             :  */
    6760           0 :   __Pyx_XDECREF((PyObject *)__pyx_r);
    6761           0 :   __Pyx_INCREF((PyObject *)__pyx_v_result);
    6762           0 :   __pyx_r = __pyx_v_result;
    6763           0 :   goto __pyx_L0;
    6764             : 
    6765             :   /* "View.MemoryView":268
    6766             :  * 
    6767             :  * @cname("__pyx_array_new")
    6768             :  * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, char *c_mode, char *buf):             # <<<<<<<<<<<<<<
    6769             :  *     cdef array result
    6770             :  *     cdef str mode = "fortran" if c_mode[0] == b'f' else "c"  # this often comes from a constant C string.
    6771             :  */
    6772             : 
    6773             :   /* function exit code */
    6774           0 :   __pyx_L1_error:;
    6775           0 :   __Pyx_XDECREF(__pyx_t_1);
    6776           0 :   __Pyx_XDECREF(__pyx_t_3);
    6777           0 :   __Pyx_XDECREF(__pyx_t_4);
    6778           0 :   __Pyx_AddTraceback("View.MemoryView.array_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6779           0 :   __pyx_r = 0;
    6780           0 :   __pyx_L0:;
    6781           0 :   __Pyx_XDECREF((PyObject *)__pyx_v_result);
    6782           0 :   __Pyx_XDECREF(__pyx_v_mode);
    6783           0 :   __Pyx_XGIVEREF((PyObject *)__pyx_r);
    6784           0 :   __Pyx_RefNannyFinishContext();
    6785           0 :   return __pyx_r;
    6786             : }
    6787             : 
    6788             : /* "View.MemoryView":304
    6789             :  * cdef class Enum(object):
    6790             :  *     cdef object name
    6791             :  *     def __init__(self, name):             # <<<<<<<<<<<<<<
    6792             :  *         self.name = name
    6793             :  *     def __repr__(self):
    6794             :  */
    6795             : 
    6796             : /* Python wrapper */
    6797             : static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    6798           5 : static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
    6799           5 :   PyObject *__pyx_v_name = 0;
    6800           5 :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
    6801           5 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    6802           5 :   PyObject* values[1] = {0};
    6803           5 :   int __pyx_lineno = 0;
    6804           5 :   const char *__pyx_filename = NULL;
    6805           5 :   int __pyx_clineno = 0;
    6806           5 :   int __pyx_r;
    6807             :   __Pyx_RefNannyDeclarations
    6808           5 :   __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
    6809             :   #if CYTHON_ASSUME_SAFE_MACROS
    6810           5 :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
    6811             :   #else
    6812             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
    6813             :   #endif
    6814           5 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    6815             :   {
    6816           5 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0};
    6817           5 :     if (__pyx_kwds) {
    6818           0 :       Py_ssize_t kw_args;
    6819           0 :       switch (__pyx_nargs) {
    6820           0 :         case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
    6821           0 :         CYTHON_FALLTHROUGH;
    6822           0 :         case  0: break;
    6823           0 :         default: goto __pyx_L5_argtuple_error;
    6824             :       }
    6825           0 :       kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
    6826           0 :       switch (__pyx_nargs) {
    6827           0 :         case  0:
    6828           0 :         if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_name)) != 0)) {
    6829           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
    6830           0 :           kw_args--;
    6831             :         }
    6832           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 304, __pyx_L3_error)
    6833           0 :         else goto __pyx_L5_argtuple_error;
    6834             :       }
    6835           0 :       if (unlikely(kw_args > 0)) {
    6836           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
    6837           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(1, 304, __pyx_L3_error)
    6838             :       }
    6839           5 :     } else if (unlikely(__pyx_nargs != 1)) {
    6840           0 :       goto __pyx_L5_argtuple_error;
    6841             :     } else {
    6842           5 :       values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
    6843             :     }
    6844           5 :     __pyx_v_name = values[0];
    6845             :   }
    6846           5 :   goto __pyx_L6_skip;
    6847           0 :   __pyx_L5_argtuple_error:;
    6848           0 :   __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 304, __pyx_L3_error)
    6849           5 :   __pyx_L6_skip:;
    6850           5 :   goto __pyx_L4_argument_unpacking_done;
    6851           0 :   __pyx_L3_error:;
    6852             :   {
    6853           0 :     Py_ssize_t __pyx_temp;
    6854           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    6855             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    6856             :     }
    6857             :   }
    6858           0 :   __Pyx_AddTraceback("View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    6859           0 :   __Pyx_RefNannyFinishContext();
    6860           0 :   return -1;
    6861           5 :   __pyx_L4_argument_unpacking_done:;
    6862           5 :   __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v_name);
    6863             : 
    6864             :   /* function exit code */
    6865             :   {
    6866           5 :     Py_ssize_t __pyx_temp;
    6867           5 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    6868             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    6869             :     }
    6870             :   }
    6871             :   __Pyx_RefNannyFinishContext();
    6872             :   return __pyx_r;
    6873             : }
    6874             : 
    6875           5 : static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name) {
    6876           5 :   int __pyx_r;
    6877             :   __Pyx_RefNannyDeclarations
    6878           5 :   __Pyx_RefNannySetupContext("__init__", 1);
    6879             : 
    6880             :   /* "View.MemoryView":305
    6881             :  *     cdef object name
    6882             :  *     def __init__(self, name):
    6883             :  *         self.name = name             # <<<<<<<<<<<<<<
    6884             :  *     def __repr__(self):
    6885             :  *         return self.name
    6886             :  */
    6887           5 :   __Pyx_INCREF(__pyx_v_name);
    6888           5 :   __Pyx_GIVEREF(__pyx_v_name);
    6889           5 :   __Pyx_GOTREF(__pyx_v_self->name);
    6890           5 :   __Pyx_DECREF(__pyx_v_self->name);
    6891           5 :   __pyx_v_self->name = __pyx_v_name;
    6892             : 
    6893             :   /* "View.MemoryView":304
    6894             :  * cdef class Enum(object):
    6895             :  *     cdef object name
    6896             :  *     def __init__(self, name):             # <<<<<<<<<<<<<<
    6897             :  *         self.name = name
    6898             :  *     def __repr__(self):
    6899             :  */
    6900             : 
    6901             :   /* function exit code */
    6902           5 :   __pyx_r = 0;
    6903           5 :   __Pyx_RefNannyFinishContext();
    6904           5 :   return __pyx_r;
    6905             : }
    6906             : 
    6907             : /* "View.MemoryView":306
    6908             :  *     def __init__(self, name):
    6909             :  *         self.name = name
    6910             :  *     def __repr__(self):             # <<<<<<<<<<<<<<
    6911             :  *         return self.name
    6912             :  * 
    6913             :  */
    6914             : 
    6915             : /* Python wrapper */
    6916             : static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self); /*proto*/
    6917           0 : static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self) {
    6918           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    6919           0 :   PyObject *__pyx_r = 0;
    6920             :   __Pyx_RefNannyDeclarations
    6921           0 :   __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
    6922           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    6923           0 :   __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
    6924             : 
    6925             :   /* function exit code */
    6926           0 :   __Pyx_RefNannyFinishContext();
    6927           0 :   return __pyx_r;
    6928             : }
    6929             : 
    6930           0 : static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
    6931           0 :   PyObject *__pyx_r = NULL;
    6932             :   __Pyx_RefNannyDeclarations
    6933           0 :   __Pyx_RefNannySetupContext("__repr__", 1);
    6934             : 
    6935             :   /* "View.MemoryView":307
    6936             :  *         self.name = name
    6937             :  *     def __repr__(self):
    6938             :  *         return self.name             # <<<<<<<<<<<<<<
    6939             :  * 
    6940             :  * cdef generic = Enum("<strided and direct or indirect>")
    6941             :  */
    6942           0 :   __Pyx_XDECREF(__pyx_r);
    6943           0 :   __Pyx_INCREF(__pyx_v_self->name);
    6944           0 :   __pyx_r = __pyx_v_self->name;
    6945           0 :   goto __pyx_L0;
    6946             : 
    6947             :   /* "View.MemoryView":306
    6948             :  *     def __init__(self, name):
    6949             :  *         self.name = name
    6950             :  *     def __repr__(self):             # <<<<<<<<<<<<<<
    6951             :  *         return self.name
    6952             :  * 
    6953             :  */
    6954             : 
    6955             :   /* function exit code */
    6956           0 :   __pyx_L0:;
    6957           0 :   __Pyx_XGIVEREF(__pyx_r);
    6958           0 :   __Pyx_RefNannyFinishContext();
    6959           0 :   return __pyx_r;
    6960             : }
    6961             : 
    6962             : /* "(tree fragment)":1
    6963             :  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
    6964             :  *     cdef tuple state
    6965             :  *     cdef object _dict
    6966             :  */
    6967             : 
    6968             : /* Python wrapper */
    6969             : static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, 
    6970             : #if CYTHON_METH_FASTCALL
    6971             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    6972             : #else
    6973             : PyObject *__pyx_args, PyObject *__pyx_kwds
    6974             : #endif
    6975             : ); /*proto*/
    6976           0 : static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, 
    6977             : #if CYTHON_METH_FASTCALL
    6978             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    6979             : #else
    6980             : PyObject *__pyx_args, PyObject *__pyx_kwds
    6981             : #endif
    6982             : ) {
    6983             :   #if !CYTHON_METH_FASTCALL
    6984             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
    6985             :   #endif
    6986           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    6987           0 :   PyObject *__pyx_r = 0;
    6988             :   __Pyx_RefNannyDeclarations
    6989           0 :   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
    6990             :   #if !CYTHON_METH_FASTCALL
    6991             :   #if CYTHON_ASSUME_SAFE_MACROS
    6992             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
    6993             :   #else
    6994             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
    6995             :   #endif
    6996             :   #endif
    6997           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
    6998           0 :   if (unlikely(__pyx_nargs > 0)) {
    6999           0 :     __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
    7000           0 :   if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
    7001           0 :   __pyx_r = __pyx_pf___pyx_MemviewEnum___reduce_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
    7002             : 
    7003             :   /* function exit code */
    7004           0 :   __Pyx_RefNannyFinishContext();
    7005           0 :   return __pyx_r;
    7006             : }
    7007             : 
    7008           0 : static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
    7009           0 :   PyObject *__pyx_v_state = 0;
    7010           0 :   PyObject *__pyx_v__dict = 0;
    7011           0 :   int __pyx_v_use_setstate;
    7012           0 :   PyObject *__pyx_r = NULL;
    7013             :   __Pyx_RefNannyDeclarations
    7014           0 :   PyObject *__pyx_t_1 = NULL;
    7015           0 :   int __pyx_t_2;
    7016           0 :   PyObject *__pyx_t_3 = NULL;
    7017           0 :   PyObject *__pyx_t_4 = NULL;
    7018           0 :   int __pyx_lineno = 0;
    7019           0 :   const char *__pyx_filename = NULL;
    7020           0 :   int __pyx_clineno = 0;
    7021           0 :   __Pyx_RefNannySetupContext("__reduce_cython__", 1);
    7022             : 
    7023             :   /* "(tree fragment)":5
    7024             :  *     cdef object _dict
    7025             :  *     cdef bint use_setstate
    7026             :  *     state = (self.name,)             # <<<<<<<<<<<<<<
    7027             :  *     _dict = getattr(self, '__dict__', None)
    7028             :  *     if _dict is not None:
    7029             :  */
    7030           0 :   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    7031           0 :   __Pyx_GOTREF(__pyx_t_1);
    7032           0 :   __Pyx_INCREF(__pyx_v_self->name);
    7033           0 :   __Pyx_GIVEREF(__pyx_v_self->name);
    7034           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name)) __PYX_ERR(1, 5, __pyx_L1_error);
    7035           0 :   __pyx_v_state = ((PyObject*)__pyx_t_1);
    7036           0 :   __pyx_t_1 = 0;
    7037             : 
    7038             :   /* "(tree fragment)":6
    7039             :  *     cdef bint use_setstate
    7040             :  *     state = (self.name,)
    7041             :  *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
    7042             :  *     if _dict is not None:
    7043             :  *         state += (_dict,)
    7044             :  */
    7045           0 :   __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    7046           0 :   __Pyx_GOTREF(__pyx_t_1);
    7047           0 :   __pyx_v__dict = __pyx_t_1;
    7048           0 :   __pyx_t_1 = 0;
    7049             : 
    7050             :   /* "(tree fragment)":7
    7051             :  *     state = (self.name,)
    7052             :  *     _dict = getattr(self, '__dict__', None)
    7053             :  *     if _dict is not None:             # <<<<<<<<<<<<<<
    7054             :  *         state += (_dict,)
    7055             :  *         use_setstate = True
    7056             :  */
    7057           0 :   __pyx_t_2 = (__pyx_v__dict != Py_None);
    7058           0 :   if (__pyx_t_2) {
    7059             : 
    7060             :     /* "(tree fragment)":8
    7061             :  *     _dict = getattr(self, '__dict__', None)
    7062             :  *     if _dict is not None:
    7063             :  *         state += (_dict,)             # <<<<<<<<<<<<<<
    7064             :  *         use_setstate = True
    7065             :  *     else:
    7066             :  */
    7067           0 :     __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
    7068           0 :     __Pyx_GOTREF(__pyx_t_1);
    7069           0 :     __Pyx_INCREF(__pyx_v__dict);
    7070           0 :     __Pyx_GIVEREF(__pyx_v__dict);
    7071           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(1, 8, __pyx_L1_error);
    7072           0 :     __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error)
    7073           0 :     __Pyx_GOTREF(__pyx_t_3);
    7074           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    7075           0 :     __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
    7076           0 :     __pyx_t_3 = 0;
    7077             : 
    7078             :     /* "(tree fragment)":9
    7079             :  *     if _dict is not None:
    7080             :  *         state += (_dict,)
    7081             :  *         use_setstate = True             # <<<<<<<<<<<<<<
    7082             :  *     else:
    7083             :  *         use_setstate = self.name is not None
    7084             :  */
    7085           0 :     __pyx_v_use_setstate = 1;
    7086             : 
    7087             :     /* "(tree fragment)":7
    7088             :  *     state = (self.name,)
    7089             :  *     _dict = getattr(self, '__dict__', None)
    7090             :  *     if _dict is not None:             # <<<<<<<<<<<<<<
    7091             :  *         state += (_dict,)
    7092             :  *         use_setstate = True
    7093             :  */
    7094           0 :     goto __pyx_L3;
    7095             :   }
    7096             : 
    7097             :   /* "(tree fragment)":11
    7098             :  *         use_setstate = True
    7099             :  *     else:
    7100             :  *         use_setstate = self.name is not None             # <<<<<<<<<<<<<<
    7101             :  *     if use_setstate:
    7102             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
    7103             :  */
    7104             :   /*else*/ {
    7105           0 :     __pyx_t_2 = (__pyx_v_self->name != Py_None);
    7106           0 :     __pyx_v_use_setstate = __pyx_t_2;
    7107             :   }
    7108           0 :   __pyx_L3:;
    7109             : 
    7110             :   /* "(tree fragment)":12
    7111             :  *     else:
    7112             :  *         use_setstate = self.name is not None
    7113             :  *     if use_setstate:             # <<<<<<<<<<<<<<
    7114             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
    7115             :  *     else:
    7116             :  */
    7117           0 :   if (__pyx_v_use_setstate) {
    7118             : 
    7119             :     /* "(tree fragment)":13
    7120             :  *         use_setstate = self.name is not None
    7121             :  *     if use_setstate:
    7122             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state             # <<<<<<<<<<<<<<
    7123             :  *     else:
    7124             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
    7125             :  */
    7126           0 :     __Pyx_XDECREF(__pyx_r);
    7127           0 :     __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
    7128           0 :     __Pyx_GOTREF(__pyx_t_3);
    7129           0 :     __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    7130           0 :     __Pyx_GOTREF(__pyx_t_1);
    7131           0 :     __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    7132           0 :     __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    7133           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 13, __pyx_L1_error);
    7134           0 :     __Pyx_INCREF(__pyx_int_136983863);
    7135           0 :     __Pyx_GIVEREF(__pyx_int_136983863);
    7136           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_136983863)) __PYX_ERR(1, 13, __pyx_L1_error);
    7137           0 :     __Pyx_INCREF(Py_None);
    7138           0 :     __Pyx_GIVEREF(Py_None);
    7139           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(1, 13, __pyx_L1_error);
    7140           0 :     __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    7141           0 :     __Pyx_GOTREF(__pyx_t_4);
    7142           0 :     __Pyx_GIVEREF(__pyx_t_3);
    7143           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error);
    7144           0 :     __Pyx_GIVEREF(__pyx_t_1);
    7145           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error);
    7146           0 :     __Pyx_INCREF(__pyx_v_state);
    7147           0 :     __Pyx_GIVEREF(__pyx_v_state);
    7148           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(1, 13, __pyx_L1_error);
    7149           0 :     __pyx_t_3 = 0;
    7150           0 :     __pyx_t_1 = 0;
    7151           0 :     __pyx_r = __pyx_t_4;
    7152           0 :     __pyx_t_4 = 0;
    7153           0 :     goto __pyx_L0;
    7154             : 
    7155             :     /* "(tree fragment)":12
    7156             :  *     else:
    7157             :  *         use_setstate = self.name is not None
    7158             :  *     if use_setstate:             # <<<<<<<<<<<<<<
    7159             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
    7160             :  *     else:
    7161             :  */
    7162             :   }
    7163             : 
    7164             :   /* "(tree fragment)":15
    7165             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, None), state
    7166             :  *     else:
    7167             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)             # <<<<<<<<<<<<<<
    7168             :  * def __setstate_cython__(self, __pyx_state):
    7169             :  *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
    7170             :  */
    7171             :   /*else*/ {
    7172           0 :     __Pyx_XDECREF(__pyx_r);
    7173           0 :     __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    7174           0 :     __Pyx_GOTREF(__pyx_t_4);
    7175           0 :     __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    7176           0 :     __Pyx_GOTREF(__pyx_t_1);
    7177           0 :     __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    7178           0 :     __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    7179           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 15, __pyx_L1_error);
    7180           0 :     __Pyx_INCREF(__pyx_int_136983863);
    7181           0 :     __Pyx_GIVEREF(__pyx_int_136983863);
    7182           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_136983863)) __PYX_ERR(1, 15, __pyx_L1_error);
    7183           0 :     __Pyx_INCREF(__pyx_v_state);
    7184           0 :     __Pyx_GIVEREF(__pyx_v_state);
    7185           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(1, 15, __pyx_L1_error);
    7186           0 :     __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
    7187           0 :     __Pyx_GOTREF(__pyx_t_3);
    7188           0 :     __Pyx_GIVEREF(__pyx_t_4);
    7189           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error);
    7190           0 :     __Pyx_GIVEREF(__pyx_t_1);
    7191           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error);
    7192           0 :     __pyx_t_4 = 0;
    7193           0 :     __pyx_t_1 = 0;
    7194           0 :     __pyx_r = __pyx_t_3;
    7195           0 :     __pyx_t_3 = 0;
    7196           0 :     goto __pyx_L0;
    7197             :   }
    7198             : 
    7199             :   /* "(tree fragment)":1
    7200             :  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
    7201             :  *     cdef tuple state
    7202             :  *     cdef object _dict
    7203             :  */
    7204             : 
    7205             :   /* function exit code */
    7206           0 :   __pyx_L1_error:;
    7207           0 :   __Pyx_XDECREF(__pyx_t_1);
    7208           0 :   __Pyx_XDECREF(__pyx_t_3);
    7209           0 :   __Pyx_XDECREF(__pyx_t_4);
    7210           0 :   __Pyx_AddTraceback("View.MemoryView.Enum.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    7211           0 :   __pyx_r = NULL;
    7212           0 :   __pyx_L0:;
    7213           0 :   __Pyx_XDECREF(__pyx_v_state);
    7214           0 :   __Pyx_XDECREF(__pyx_v__dict);
    7215           0 :   __Pyx_XGIVEREF(__pyx_r);
    7216           0 :   __Pyx_RefNannyFinishContext();
    7217           0 :   return __pyx_r;
    7218             : }
    7219             : 
    7220             : /* "(tree fragment)":16
    7221             :  *     else:
    7222             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
    7223             :  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
    7224             :  *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
    7225             :  */
    7226             : 
    7227             : /* Python wrapper */
    7228             : static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, 
    7229             : #if CYTHON_METH_FASTCALL
    7230             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    7231             : #else
    7232             : PyObject *__pyx_args, PyObject *__pyx_kwds
    7233             : #endif
    7234             : ); /*proto*/
    7235           0 : static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, 
    7236             : #if CYTHON_METH_FASTCALL
    7237             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    7238             : #else
    7239             : PyObject *__pyx_args, PyObject *__pyx_kwds
    7240             : #endif
    7241             : ) {
    7242           0 :   PyObject *__pyx_v___pyx_state = 0;
    7243             :   #if !CYTHON_METH_FASTCALL
    7244             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
    7245             :   #endif
    7246           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    7247           0 :   PyObject* values[1] = {0};
    7248           0 :   int __pyx_lineno = 0;
    7249           0 :   const char *__pyx_filename = NULL;
    7250           0 :   int __pyx_clineno = 0;
    7251           0 :   PyObject *__pyx_r = 0;
    7252             :   __Pyx_RefNannyDeclarations
    7253           0 :   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
    7254             :   #if !CYTHON_METH_FASTCALL
    7255             :   #if CYTHON_ASSUME_SAFE_MACROS
    7256             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
    7257             :   #else
    7258             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
    7259             :   #endif
    7260             :   #endif
    7261           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
    7262             :   {
    7263           0 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
    7264           0 :     if (__pyx_kwds) {
    7265           0 :       Py_ssize_t kw_args;
    7266           0 :       switch (__pyx_nargs) {
    7267           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    7268           0 :         CYTHON_FALLTHROUGH;
    7269           0 :         case  0: break;
    7270           0 :         default: goto __pyx_L5_argtuple_error;
    7271             :       }
    7272           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
    7273           0 :       switch (__pyx_nargs) {
    7274             :         case  0:
    7275           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
    7276           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
    7277           0 :           kw_args--;
    7278             :         }
    7279           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error)
    7280           0 :         else goto __pyx_L5_argtuple_error;
    7281             :       }
    7282           0 :       if (unlikely(kw_args > 0)) {
    7283           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
    7284           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 16, __pyx_L3_error)
    7285             :       }
    7286           0 :     } else if (unlikely(__pyx_nargs != 1)) {
    7287           0 :       goto __pyx_L5_argtuple_error;
    7288             :     } else {
    7289           0 :       values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    7290             :     }
    7291           0 :     __pyx_v___pyx_state = values[0];
    7292             :   }
    7293           0 :   goto __pyx_L6_skip;
    7294           0 :   __pyx_L5_argtuple_error:;
    7295           0 :   __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error)
    7296           0 :   __pyx_L6_skip:;
    7297           0 :   goto __pyx_L4_argument_unpacking_done;
    7298           0 :   __pyx_L3_error:;
    7299             :   {
    7300           0 :     Py_ssize_t __pyx_temp;
    7301           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    7302             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    7303             :     }
    7304             :   }
    7305           0 :   __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    7306           0 :   __Pyx_RefNannyFinishContext();
    7307           0 :   return NULL;
    7308           0 :   __pyx_L4_argument_unpacking_done:;
    7309           0 :   __pyx_r = __pyx_pf___pyx_MemviewEnum_2__setstate_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v___pyx_state);
    7310             : 
    7311             :   /* function exit code */
    7312             :   {
    7313           0 :     Py_ssize_t __pyx_temp;
    7314           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    7315             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    7316             :     }
    7317             :   }
    7318             :   __Pyx_RefNannyFinishContext();
    7319             :   return __pyx_r;
    7320             : }
    7321             : 
    7322           0 : static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
    7323           0 :   PyObject *__pyx_r = NULL;
    7324             :   __Pyx_RefNannyDeclarations
    7325           0 :   PyObject *__pyx_t_1 = NULL;
    7326           0 :   int __pyx_lineno = 0;
    7327           0 :   const char *__pyx_filename = NULL;
    7328           0 :   int __pyx_clineno = 0;
    7329           0 :   __Pyx_RefNannySetupContext("__setstate_cython__", 1);
    7330             : 
    7331             :   /* "(tree fragment)":17
    7332             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
    7333             :  * def __setstate_cython__(self, __pyx_state):
    7334             :  *     __pyx_unpickle_Enum__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
    7335             :  */
    7336           0 :   if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 17, __pyx_L1_error)
    7337           0 :   __pyx_t_1 = __pyx_unpickle_Enum__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
    7338           0 :   __Pyx_GOTREF(__pyx_t_1);
    7339           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    7340             : 
    7341             :   /* "(tree fragment)":16
    7342             :  *     else:
    7343             :  *         return __pyx_unpickle_Enum, (type(self), 0x82a3537, state)
    7344             :  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
    7345             :  *     __pyx_unpickle_Enum__set_state(self, __pyx_state)
    7346             :  */
    7347             : 
    7348             :   /* function exit code */
    7349           0 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    7350           0 :   goto __pyx_L0;
    7351           0 :   __pyx_L1_error:;
    7352           0 :   __Pyx_XDECREF(__pyx_t_1);
    7353           0 :   __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    7354           0 :   __pyx_r = NULL;
    7355           0 :   __pyx_L0:;
    7356           0 :   __Pyx_XGIVEREF(__pyx_r);
    7357           0 :   __Pyx_RefNannyFinishContext();
    7358           0 :   return __pyx_r;
    7359             : }
    7360             : 
    7361             : /* "View.MemoryView":349
    7362             :  *     cdef __Pyx_TypeInfo *typeinfo
    7363             :  * 
    7364             :  *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):             # <<<<<<<<<<<<<<
    7365             :  *         self.obj = obj
    7366             :  *         self.flags = flags
    7367             :  */
    7368             : 
    7369             : /* Python wrapper */
    7370             : static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
    7371         141 : static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
    7372         141 :   PyObject *__pyx_v_obj = 0;
    7373         141 :   int __pyx_v_flags;
    7374         141 :   int __pyx_v_dtype_is_object;
    7375         141 :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
    7376         141 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    7377         141 :   PyObject* values[3] = {0,0,0};
    7378         141 :   int __pyx_lineno = 0;
    7379         141 :   const char *__pyx_filename = NULL;
    7380         141 :   int __pyx_clineno = 0;
    7381         141 :   int __pyx_r;
    7382             :   __Pyx_RefNannyDeclarations
    7383         141 :   __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
    7384             :   #if CYTHON_ASSUME_SAFE_MACROS
    7385         141 :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
    7386             :   #else
    7387             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
    7388             :   #endif
    7389         141 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    7390             :   {
    7391         141 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_flags,&__pyx_n_s_dtype_is_object,0};
    7392         141 :     if (__pyx_kwds) {
    7393           0 :       Py_ssize_t kw_args;
    7394           0 :       switch (__pyx_nargs) {
    7395           0 :         case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
    7396           0 :         CYTHON_FALLTHROUGH;
    7397           0 :         case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
    7398           0 :         CYTHON_FALLTHROUGH;
    7399           0 :         case  1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
    7400           0 :         CYTHON_FALLTHROUGH;
    7401           0 :         case  0: break;
    7402           0 :         default: goto __pyx_L5_argtuple_error;
    7403             :       }
    7404           0 :       kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
    7405           0 :       switch (__pyx_nargs) {
    7406           0 :         case  0:
    7407           0 :         if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_obj)) != 0)) {
    7408           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
    7409           0 :           kw_args--;
    7410             :         }
    7411           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error)
    7412           0 :         else goto __pyx_L5_argtuple_error;
    7413           0 :         CYTHON_FALLTHROUGH;
    7414             :         case  1:
    7415           0 :         if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_flags)) != 0)) {
    7416           0 :           (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
    7417           0 :           kw_args--;
    7418             :         }
    7419           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error)
    7420             :         else {
    7421           0 :           __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(1, 349, __pyx_L3_error)
    7422             :         }
    7423           0 :         CYTHON_FALLTHROUGH;
    7424             :         case  2:
    7425           0 :         if (kw_args > 0) {
    7426           0 :           PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dtype_is_object);
    7427           0 :           if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
    7428           0 :           else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error)
    7429             :         }
    7430             :       }
    7431           0 :       if (unlikely(kw_args > 0)) {
    7432           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
    7433           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__cinit__") < 0)) __PYX_ERR(1, 349, __pyx_L3_error)
    7434             :       }
    7435             :     } else {
    7436         141 :       switch (__pyx_nargs) {
    7437         141 :         case  3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
    7438         141 :         CYTHON_FALLTHROUGH;
    7439         141 :         case  2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
    7440         141 :         values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
    7441         141 :         break;
    7442           0 :         default: goto __pyx_L5_argtuple_error;
    7443             :       }
    7444             :     }
    7445         141 :     __pyx_v_obj = values[0];
    7446         141 :     __pyx_v_flags = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error)
    7447         141 :     if (values[2]) {
    7448         141 :       __pyx_v_dtype_is_object = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_dtype_is_object == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 349, __pyx_L3_error)
    7449             :     } else {
    7450             :       __pyx_v_dtype_is_object = ((int)0);
    7451             :     }
    7452             :   }
    7453         141 :   goto __pyx_L6_skip;
    7454           0 :   __pyx_L5_argtuple_error:;
    7455           0 :   __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, __pyx_nargs); __PYX_ERR(1, 349, __pyx_L3_error)
    7456         141 :   __pyx_L6_skip:;
    7457         141 :   goto __pyx_L4_argument_unpacking_done;
    7458           0 :   __pyx_L3_error:;
    7459             :   {
    7460           0 :     Py_ssize_t __pyx_temp;
    7461           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    7462             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    7463             :     }
    7464             :   }
    7465           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    7466           0 :   __Pyx_RefNannyFinishContext();
    7467           0 :   return -1;
    7468         141 :   __pyx_L4_argument_unpacking_done:;
    7469         141 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_obj, __pyx_v_flags, __pyx_v_dtype_is_object);
    7470             : 
    7471             :   /* function exit code */
    7472             :   {
    7473         141 :     Py_ssize_t __pyx_temp;
    7474         141 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
    7475             :       __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
    7476             :     }
    7477             :   }
    7478             :   __Pyx_RefNannyFinishContext();
    7479             :   return __pyx_r;
    7480             : }
    7481             : 
    7482         141 : static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object) {
    7483         141 :   int __pyx_r;
    7484             :   __Pyx_RefNannyDeclarations
    7485         141 :   int __pyx_t_1;
    7486         141 :   int __pyx_t_2;
    7487         141 :   int __pyx_t_3;
    7488         141 :   Py_intptr_t __pyx_t_4;
    7489         141 :   size_t __pyx_t_5;
    7490         141 :   int __pyx_lineno = 0;
    7491         141 :   const char *__pyx_filename = NULL;
    7492         141 :   int __pyx_clineno = 0;
    7493         141 :   __Pyx_RefNannySetupContext("__cinit__", 1);
    7494             : 
    7495             :   /* "View.MemoryView":350
    7496             :  * 
    7497             :  *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
    7498             :  *         self.obj = obj             # <<<<<<<<<<<<<<
    7499             :  *         self.flags = flags
    7500             :  *         if type(self) is memoryview or obj is not None:
    7501             :  */
    7502         141 :   __Pyx_INCREF(__pyx_v_obj);
    7503         141 :   __Pyx_GIVEREF(__pyx_v_obj);
    7504         141 :   __Pyx_GOTREF(__pyx_v_self->obj);
    7505         141 :   __Pyx_DECREF(__pyx_v_self->obj);
    7506         141 :   __pyx_v_self->obj = __pyx_v_obj;
    7507             : 
    7508             :   /* "View.MemoryView":351
    7509             :  *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
    7510             :  *         self.obj = obj
    7511             :  *         self.flags = flags             # <<<<<<<<<<<<<<
    7512             :  *         if type(self) is memoryview or obj is not None:
    7513             :  *             __Pyx_GetBuffer(obj, &self.view, flags)
    7514             :  */
    7515         141 :   __pyx_v_self->flags = __pyx_v_flags;
    7516             : 
    7517             :   /* "View.MemoryView":352
    7518             :  *         self.obj = obj
    7519             :  *         self.flags = flags
    7520             :  *         if type(self) is memoryview or obj is not None:             # <<<<<<<<<<<<<<
    7521             :  *             __Pyx_GetBuffer(obj, &self.view, flags)
    7522             :  *             if <PyObject *> self.view.obj == NULL:
    7523             :  */
    7524         141 :   __pyx_t_2 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_memoryview_type));
    7525         141 :   if (!__pyx_t_2) {
    7526           0 :   } else {
    7527         141 :     __pyx_t_1 = __pyx_t_2;
    7528         141 :     goto __pyx_L4_bool_binop_done;
    7529             :   }
    7530           0 :   __pyx_t_2 = (__pyx_v_obj != Py_None);
    7531           0 :   __pyx_t_1 = __pyx_t_2;
    7532         141 :   __pyx_L4_bool_binop_done:;
    7533         141 :   if (__pyx_t_1) {
    7534             : 
    7535             :     /* "View.MemoryView":353
    7536             :  *         self.flags = flags
    7537             :  *         if type(self) is memoryview or obj is not None:
    7538             :  *             __Pyx_GetBuffer(obj, &self.view, flags)             # <<<<<<<<<<<<<<
    7539             :  *             if <PyObject *> self.view.obj == NULL:
    7540             :  *                 (<__pyx_buffer *> &self.view).obj = Py_None
    7541             :  */
    7542         141 :     __pyx_t_3 = __Pyx_GetBuffer(__pyx_v_obj, (&__pyx_v_self->view), __pyx_v_flags); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 353, __pyx_L1_error)
    7543             : 
    7544             :     /* "View.MemoryView":354
    7545             :  *         if type(self) is memoryview or obj is not None:
    7546             :  *             __Pyx_GetBuffer(obj, &self.view, flags)
    7547             :  *             if <PyObject *> self.view.obj == NULL:             # <<<<<<<<<<<<<<
    7548             :  *                 (<__pyx_buffer *> &self.view).obj = Py_None
    7549             :  *                 Py_INCREF(Py_None)
    7550             :  */
    7551         141 :     __pyx_t_1 = (((PyObject *)__pyx_v_self->view.obj) == NULL);
    7552         141 :     if (__pyx_t_1) {
    7553             : 
    7554             :       /* "View.MemoryView":355
    7555             :  *             __Pyx_GetBuffer(obj, &self.view, flags)
    7556             :  *             if <PyObject *> self.view.obj == NULL:
    7557             :  *                 (<__pyx_buffer *> &self.view).obj = Py_None             # <<<<<<<<<<<<<<
    7558             :  *                 Py_INCREF(Py_None)
    7559             :  * 
    7560             :  */
    7561           0 :       ((Py_buffer *)(&__pyx_v_self->view))->obj = Py_None;
    7562             : 
    7563             :       /* "View.MemoryView":356
    7564             :  *             if <PyObject *> self.view.obj == NULL:
    7565             :  *                 (<__pyx_buffer *> &self.view).obj = Py_None
    7566             :  *                 Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
    7567             :  * 
    7568             :  *         if not __PYX_CYTHON_ATOMICS_ENABLED():
    7569             :  */
    7570           0 :       Py_INCREF(Py_None);
    7571             : 
    7572             :       /* "View.MemoryView":354
    7573             :  *         if type(self) is memoryview or obj is not None:
    7574             :  *             __Pyx_GetBuffer(obj, &self.view, flags)
    7575             :  *             if <PyObject *> self.view.obj == NULL:             # <<<<<<<<<<<<<<
    7576             :  *                 (<__pyx_buffer *> &self.view).obj = Py_None
    7577             :  *                 Py_INCREF(Py_None)
    7578             :  */
    7579             :     }
    7580             : 
    7581             :     /* "View.MemoryView":352
    7582             :  *         self.obj = obj
    7583             :  *         self.flags = flags
    7584             :  *         if type(self) is memoryview or obj is not None:             # <<<<<<<<<<<<<<
    7585             :  *             __Pyx_GetBuffer(obj, &self.view, flags)
    7586             :  *             if <PyObject *> self.view.obj == NULL:
    7587             :  */
    7588             :   }
    7589             : 
    7590             :   /* "View.MemoryView":358
    7591             :  *                 Py_INCREF(Py_None)
    7592             :  * 
    7593             :  *         if not __PYX_CYTHON_ATOMICS_ENABLED():             # <<<<<<<<<<<<<<
    7594             :  *             global __pyx_memoryview_thread_locks_used
    7595             :  *             if __pyx_memoryview_thread_locks_used < 8:
    7596             :  */
    7597         141 :   __pyx_t_1 = (!__PYX_CYTHON_ATOMICS_ENABLED());
    7598         141 :   if (__pyx_t_1) {
    7599             : 
    7600             :     /* "View.MemoryView":360
    7601             :  *         if not __PYX_CYTHON_ATOMICS_ENABLED():
    7602             :  *             global __pyx_memoryview_thread_locks_used
    7603             :  *             if __pyx_memoryview_thread_locks_used < 8:             # <<<<<<<<<<<<<<
    7604             :  *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
    7605             :  *                 __pyx_memoryview_thread_locks_used += 1
    7606             :  */
    7607             :     __pyx_t_1 = (__pyx_memoryview_thread_locks_used < 8);
    7608             :     if (__pyx_t_1) {
    7609             : 
    7610             :       /* "View.MemoryView":361
    7611             :  *             global __pyx_memoryview_thread_locks_used
    7612             :  *             if __pyx_memoryview_thread_locks_used < 8:
    7613             :  *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]             # <<<<<<<<<<<<<<
    7614             :  *                 __pyx_memoryview_thread_locks_used += 1
    7615             :  *             if self.lock is NULL:
    7616             :  */
    7617             :       __pyx_v_self->lock = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
    7618             : 
    7619             :       /* "View.MemoryView":362
    7620             :  *             if __pyx_memoryview_thread_locks_used < 8:
    7621             :  *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
    7622             :  *                 __pyx_memoryview_thread_locks_used += 1             # <<<<<<<<<<<<<<
    7623             :  *             if self.lock is NULL:
    7624             :  *                 self.lock = PyThread_allocate_lock()
    7625             :  */
    7626             :       __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used + 1);
    7627             : 
    7628             :       /* "View.MemoryView":360
    7629             :  *         if not __PYX_CYTHON_ATOMICS_ENABLED():
    7630             :  *             global __pyx_memoryview_thread_locks_used
    7631             :  *             if __pyx_memoryview_thread_locks_used < 8:             # <<<<<<<<<<<<<<
    7632             :  *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
    7633             :  *                 __pyx_memoryview_thread_locks_used += 1
    7634             :  */
    7635             :     }
    7636             : 
    7637             :     /* "View.MemoryView":363
    7638             :  *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
    7639             :  *                 __pyx_memoryview_thread_locks_used += 1
    7640             :  *             if self.lock is NULL:             # <<<<<<<<<<<<<<
    7641             :  *                 self.lock = PyThread_allocate_lock()
    7642             :  *                 if self.lock is NULL:
    7643             :  */
    7644             :     __pyx_t_1 = (__pyx_v_self->lock == NULL);
    7645             :     if (__pyx_t_1) {
    7646             : 
    7647             :       /* "View.MemoryView":364
    7648             :  *                 __pyx_memoryview_thread_locks_used += 1
    7649             :  *             if self.lock is NULL:
    7650             :  *                 self.lock = PyThread_allocate_lock()             # <<<<<<<<<<<<<<
    7651             :  *                 if self.lock is NULL:
    7652             :  *                     raise MemoryError
    7653             :  */
    7654             :       __pyx_v_self->lock = PyThread_allocate_lock();
    7655             : 
    7656             :       /* "View.MemoryView":365
    7657             :  *             if self.lock is NULL:
    7658             :  *                 self.lock = PyThread_allocate_lock()
    7659             :  *                 if self.lock is NULL:             # <<<<<<<<<<<<<<
    7660             :  *                     raise MemoryError
    7661             :  * 
    7662             :  */
    7663             :       __pyx_t_1 = (__pyx_v_self->lock == NULL);
    7664             :       if (unlikely(__pyx_t_1)) {
    7665             : 
    7666             :         /* "View.MemoryView":366
    7667             :  *                 self.lock = PyThread_allocate_lock()
    7668             :  *                 if self.lock is NULL:
    7669             :  *                     raise MemoryError             # <<<<<<<<<<<<<<
    7670             :  * 
    7671             :  *         if flags & PyBUF_FORMAT:
    7672             :  */
    7673             :         PyErr_NoMemory(); __PYX_ERR(1, 366, __pyx_L1_error)
    7674             : 
    7675             :         /* "View.MemoryView":365
    7676             :  *             if self.lock is NULL:
    7677             :  *                 self.lock = PyThread_allocate_lock()
    7678             :  *                 if self.lock is NULL:             # <<<<<<<<<<<<<<
    7679             :  *                     raise MemoryError
    7680             :  * 
    7681             :  */
    7682             :       }
    7683             : 
    7684             :       /* "View.MemoryView":363
    7685             :  *                 self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
    7686             :  *                 __pyx_memoryview_thread_locks_used += 1
    7687             :  *             if self.lock is NULL:             # <<<<<<<<<<<<<<
    7688             :  *                 self.lock = PyThread_allocate_lock()
    7689             :  *                 if self.lock is NULL:
    7690             :  */
    7691             :     }
    7692             : 
    7693             :     /* "View.MemoryView":358
    7694             :  *                 Py_INCREF(Py_None)
    7695             :  * 
    7696             :  *         if not __PYX_CYTHON_ATOMICS_ENABLED():             # <<<<<<<<<<<<<<
    7697             :  *             global __pyx_memoryview_thread_locks_used
    7698             :  *             if __pyx_memoryview_thread_locks_used < 8:
    7699             :  */
    7700             :   }
    7701             : 
    7702             :   /* "View.MemoryView":368
    7703             :  *                     raise MemoryError
    7704             :  * 
    7705             :  *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
    7706             :  *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
    7707             :  *         else:
    7708             :  */
    7709         141 :   __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
    7710         141 :   if (__pyx_t_1) {
    7711             : 
    7712             :     /* "View.MemoryView":369
    7713             :  * 
    7714             :  *         if flags & PyBUF_FORMAT:
    7715             :  *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')             # <<<<<<<<<<<<<<
    7716             :  *         else:
    7717             :  *             self.dtype_is_object = dtype_is_object
    7718             :  */
    7719         141 :     __pyx_t_2 = ((__pyx_v_self->view.format[0]) == 'O');
    7720         141 :     if (__pyx_t_2) {
    7721           0 :     } else {
    7722         141 :       __pyx_t_1 = __pyx_t_2;
    7723         141 :       goto __pyx_L12_bool_binop_done;
    7724             :     }
    7725           0 :     __pyx_t_2 = ((__pyx_v_self->view.format[1]) == '\x00');
    7726           0 :     __pyx_t_1 = __pyx_t_2;
    7727         141 :     __pyx_L12_bool_binop_done:;
    7728         141 :     __pyx_v_self->dtype_is_object = __pyx_t_1;
    7729             : 
    7730             :     /* "View.MemoryView":368
    7731             :  *                     raise MemoryError
    7732             :  * 
    7733             :  *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
    7734             :  *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
    7735             :  *         else:
    7736             :  */
    7737         141 :     goto __pyx_L11;
    7738             :   }
    7739             : 
    7740             :   /* "View.MemoryView":371
    7741             :  *             self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
    7742             :  *         else:
    7743             :  *             self.dtype_is_object = dtype_is_object             # <<<<<<<<<<<<<<
    7744             :  * 
    7745             :  *         assert <Py_intptr_t><void*>(&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0
    7746             :  */
    7747             :   /*else*/ {
    7748           0 :     __pyx_v_self->dtype_is_object = __pyx_v_dtype_is_object;
    7749             :   }
    7750         141 :   __pyx_L11:;
    7751             : 
    7752             :   /* "View.MemoryView":373
    7753             :  *             self.dtype_is_object = dtype_is_object
    7754             :  * 
    7755             :  *         assert <Py_intptr_t><void*>(&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0             # <<<<<<<<<<<<<<
    7756             :  *         self.typeinfo = NULL
    7757             :  * 
    7758             :  */
    7759             :   #ifndef CYTHON_WITHOUT_ASSERTIONS
    7760         141 :   if (unlikely(__pyx_assertions_enabled())) {
    7761         141 :     __pyx_t_4 = ((Py_intptr_t)((void *)(&__pyx_v_self->acquisition_count)));
    7762         141 :     __pyx_t_5 = (sizeof(__pyx_atomic_int_type));
    7763         141 :     if (unlikely(__pyx_t_5 == 0)) {
    7764             :       PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
    7765             :       __PYX_ERR(1, 373, __pyx_L1_error)
    7766             :     }
    7767         141 :     __pyx_t_1 = ((__pyx_t_4 % __pyx_t_5) == 0);
    7768         141 :     if (unlikely(!__pyx_t_1)) {
    7769           0 :       __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
    7770           0 :       __PYX_ERR(1, 373, __pyx_L1_error)
    7771             :     }
    7772             :   }
    7773             :   #else
    7774             :   if ((1)); else __PYX_ERR(1, 373, __pyx_L1_error)
    7775             :   #endif
    7776             : 
    7777             :   /* "View.MemoryView":374
    7778             :  * 
    7779             :  *         assert <Py_intptr_t><void*>(&self.acquisition_count) % sizeof(__pyx_atomic_int_type) == 0
    7780             :  *         self.typeinfo = NULL             # <<<<<<<<<<<<<<
    7781             :  * 
    7782             :  *     def __dealloc__(memoryview self):
    7783             :  */
    7784         141 :   __pyx_v_self->typeinfo = NULL;
    7785             : 
    7786             :   /* "View.MemoryView":349
    7787             :  *     cdef __Pyx_TypeInfo *typeinfo
    7788             :  * 
    7789             :  *     def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):             # <<<<<<<<<<<<<<
    7790             :  *         self.obj = obj
    7791             :  *         self.flags = flags
    7792             :  */
    7793             : 
    7794             :   /* function exit code */
    7795         141 :   __pyx_r = 0;
    7796         141 :   goto __pyx_L0;
    7797           0 :   __pyx_L1_error:;
    7798           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    7799           0 :   __pyx_r = -1;
    7800         141 :   __pyx_L0:;
    7801         141 :   __Pyx_RefNannyFinishContext();
    7802         141 :   return __pyx_r;
    7803             : }
    7804             : 
    7805             : /* "View.MemoryView":376
    7806             :  *         self.typeinfo = NULL
    7807             :  * 
    7808             :  *     def __dealloc__(memoryview self):             # <<<<<<<<<<<<<<
    7809             :  *         if self.obj is not None:
    7810             :  *             __Pyx_ReleaseBuffer(&self.view)
    7811             :  */
    7812             : 
    7813             : /* Python wrapper */
    7814             : static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self); /*proto*/
    7815         141 : static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self) {
    7816         141 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    7817             :   __Pyx_RefNannyDeclarations
    7818         141 :   __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
    7819         141 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    7820         141 :   __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(((struct __pyx_memoryview_obj *)__pyx_v_self));
    7821             : 
    7822             :   /* function exit code */
    7823         141 :   __Pyx_RefNannyFinishContext();
    7824             : }
    7825             : 
    7826         141 : static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self) {
    7827         141 :   int __pyx_v_i;
    7828         141 :   int __pyx_t_1;
    7829         141 :   int __pyx_t_2;
    7830         141 :   int __pyx_t_3;
    7831         141 :   int __pyx_t_4;
    7832         141 :   PyThread_type_lock __pyx_t_5;
    7833         141 :   PyThread_type_lock __pyx_t_6;
    7834             : 
    7835             :   /* "View.MemoryView":377
    7836             :  * 
    7837             :  *     def __dealloc__(memoryview self):
    7838             :  *         if self.obj is not None:             # <<<<<<<<<<<<<<
    7839             :  *             __Pyx_ReleaseBuffer(&self.view)
    7840             :  *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
    7841             :  */
    7842         141 :   __pyx_t_1 = (__pyx_v_self->obj != Py_None);
    7843         141 :   if (__pyx_t_1) {
    7844             : 
    7845             :     /* "View.MemoryView":378
    7846             :  *     def __dealloc__(memoryview self):
    7847             :  *         if self.obj is not None:
    7848             :  *             __Pyx_ReleaseBuffer(&self.view)             # <<<<<<<<<<<<<<
    7849             :  *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
    7850             :  * 
    7851             :  */
    7852         141 :     __Pyx_ReleaseBuffer((&__pyx_v_self->view));
    7853             : 
    7854             :     /* "View.MemoryView":377
    7855             :  * 
    7856             :  *     def __dealloc__(memoryview self):
    7857             :  *         if self.obj is not None:             # <<<<<<<<<<<<<<
    7858             :  *             __Pyx_ReleaseBuffer(&self.view)
    7859             :  *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
    7860             :  */
    7861         141 :     goto __pyx_L3;
    7862             :   }
    7863             : 
    7864             :   /* "View.MemoryView":379
    7865             :  *         if self.obj is not None:
    7866             :  *             __Pyx_ReleaseBuffer(&self.view)
    7867             :  *         elif (<__pyx_buffer *> &self.view).obj == Py_None:             # <<<<<<<<<<<<<<
    7868             :  * 
    7869             :  *             (<__pyx_buffer *> &self.view).obj = NULL
    7870             :  */
    7871           0 :   __pyx_t_1 = (((Py_buffer *)(&__pyx_v_self->view))->obj == Py_None);
    7872           0 :   if (__pyx_t_1) {
    7873             : 
    7874             :     /* "View.MemoryView":381
    7875             :  *         elif (<__pyx_buffer *> &self.view).obj == Py_None:
    7876             :  * 
    7877             :  *             (<__pyx_buffer *> &self.view).obj = NULL             # <<<<<<<<<<<<<<
    7878             :  *             Py_DECREF(Py_None)
    7879             :  * 
    7880             :  */
    7881           0 :     ((Py_buffer *)(&__pyx_v_self->view))->obj = NULL;
    7882             : 
    7883             :     /* "View.MemoryView":382
    7884             :  * 
    7885             :  *             (<__pyx_buffer *> &self.view).obj = NULL
    7886             :  *             Py_DECREF(Py_None)             # <<<<<<<<<<<<<<
    7887             :  * 
    7888             :  *         cdef int i
    7889             :  */
    7890           0 :     Py_DECREF(Py_None);
    7891             : 
    7892             :     /* "View.MemoryView":379
    7893             :  *         if self.obj is not None:
    7894             :  *             __Pyx_ReleaseBuffer(&self.view)
    7895             :  *         elif (<__pyx_buffer *> &self.view).obj == Py_None:             # <<<<<<<<<<<<<<
    7896             :  * 
    7897             :  *             (<__pyx_buffer *> &self.view).obj = NULL
    7898             :  */
    7899             :   }
    7900           0 :   __pyx_L3:;
    7901             : 
    7902             :   /* "View.MemoryView":386
    7903             :  *         cdef int i
    7904             :  *         global __pyx_memoryview_thread_locks_used
    7905             :  *         if self.lock != NULL:             # <<<<<<<<<<<<<<
    7906             :  *             for i in range(__pyx_memoryview_thread_locks_used):
    7907             :  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
    7908             :  */
    7909         141 :   __pyx_t_1 = (__pyx_v_self->lock != NULL);
    7910         141 :   if (__pyx_t_1) {
    7911             : 
    7912             :     /* "View.MemoryView":387
    7913             :  *         global __pyx_memoryview_thread_locks_used
    7914             :  *         if self.lock != NULL:
    7915             :  *             for i in range(__pyx_memoryview_thread_locks_used):             # <<<<<<<<<<<<<<
    7916             :  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
    7917             :  *                     __pyx_memoryview_thread_locks_used -= 1
    7918             :  */
    7919           0 :     __pyx_t_2 = __pyx_memoryview_thread_locks_used;
    7920           0 :     __pyx_t_3 = __pyx_t_2;
    7921           0 :     for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    7922           0 :       __pyx_v_i = __pyx_t_4;
    7923             : 
    7924             :       /* "View.MemoryView":388
    7925             :  *         if self.lock != NULL:
    7926             :  *             for i in range(__pyx_memoryview_thread_locks_used):
    7927             :  *                 if __pyx_memoryview_thread_locks[i] is self.lock:             # <<<<<<<<<<<<<<
    7928             :  *                     __pyx_memoryview_thread_locks_used -= 1
    7929             :  *                     if i != __pyx_memoryview_thread_locks_used:
    7930             :  */
    7931           0 :       __pyx_t_1 = ((__pyx_memoryview_thread_locks[__pyx_v_i]) == __pyx_v_self->lock);
    7932           0 :       if (__pyx_t_1) {
    7933             : 
    7934             :         /* "View.MemoryView":389
    7935             :  *             for i in range(__pyx_memoryview_thread_locks_used):
    7936             :  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
    7937             :  *                     __pyx_memoryview_thread_locks_used -= 1             # <<<<<<<<<<<<<<
    7938             :  *                     if i != __pyx_memoryview_thread_locks_used:
    7939             :  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
    7940             :  */
    7941           0 :         __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used - 1);
    7942             : 
    7943             :         /* "View.MemoryView":390
    7944             :  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
    7945             :  *                     __pyx_memoryview_thread_locks_used -= 1
    7946             :  *                     if i != __pyx_memoryview_thread_locks_used:             # <<<<<<<<<<<<<<
    7947             :  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
    7948             :  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
    7949             :  */
    7950           0 :         __pyx_t_1 = (__pyx_v_i != __pyx_memoryview_thread_locks_used);
    7951           0 :         if (__pyx_t_1) {
    7952             : 
    7953             :           /* "View.MemoryView":392
    7954             :  *                     if i != __pyx_memoryview_thread_locks_used:
    7955             :  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
    7956             :  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])             # <<<<<<<<<<<<<<
    7957             :  *                     break
    7958             :  *             else:
    7959             :  */
    7960           0 :           __pyx_t_5 = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
    7961           0 :           __pyx_t_6 = (__pyx_memoryview_thread_locks[__pyx_v_i]);
    7962             : 
    7963             :           /* "View.MemoryView":391
    7964             :  *                     __pyx_memoryview_thread_locks_used -= 1
    7965             :  *                     if i != __pyx_memoryview_thread_locks_used:
    7966             :  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (             # <<<<<<<<<<<<<<
    7967             :  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
    7968             :  *                     break
    7969             :  */
    7970           0 :           (__pyx_memoryview_thread_locks[__pyx_v_i]) = __pyx_t_5;
    7971           0 :           (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]) = __pyx_t_6;
    7972             : 
    7973             :           /* "View.MemoryView":390
    7974             :  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
    7975             :  *                     __pyx_memoryview_thread_locks_used -= 1
    7976             :  *                     if i != __pyx_memoryview_thread_locks_used:             # <<<<<<<<<<<<<<
    7977             :  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
    7978             :  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
    7979             :  */
    7980             :         }
    7981             : 
    7982             :         /* "View.MemoryView":393
    7983             :  *                         __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
    7984             :  *                             __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
    7985             :  *                     break             # <<<<<<<<<<<<<<
    7986             :  *             else:
    7987             :  *                 PyThread_free_lock(self.lock)
    7988             :  */
    7989           0 :         goto __pyx_L6_break;
    7990             : 
    7991             :         /* "View.MemoryView":388
    7992             :  *         if self.lock != NULL:
    7993             :  *             for i in range(__pyx_memoryview_thread_locks_used):
    7994             :  *                 if __pyx_memoryview_thread_locks[i] is self.lock:             # <<<<<<<<<<<<<<
    7995             :  *                     __pyx_memoryview_thread_locks_used -= 1
    7996             :  *                     if i != __pyx_memoryview_thread_locks_used:
    7997             :  */
    7998             :       }
    7999             :     }
    8000             :     /*else*/ {
    8001             : 
    8002             :       /* "View.MemoryView":395
    8003             :  *                     break
    8004             :  *             else:
    8005             :  *                 PyThread_free_lock(self.lock)             # <<<<<<<<<<<<<<
    8006             :  * 
    8007             :  *     cdef char *get_item_pointer(memoryview self, object index) except NULL:
    8008             :  */
    8009           0 :       PyThread_free_lock(__pyx_v_self->lock);
    8010             :     }
    8011         141 :     __pyx_L6_break:;
    8012             : 
    8013             :     /* "View.MemoryView":386
    8014             :  *         cdef int i
    8015             :  *         global __pyx_memoryview_thread_locks_used
    8016             :  *         if self.lock != NULL:             # <<<<<<<<<<<<<<
    8017             :  *             for i in range(__pyx_memoryview_thread_locks_used):
    8018             :  *                 if __pyx_memoryview_thread_locks[i] is self.lock:
    8019             :  */
    8020             :   }
    8021             : 
    8022             :   /* "View.MemoryView":376
    8023             :  *         self.typeinfo = NULL
    8024             :  * 
    8025             :  *     def __dealloc__(memoryview self):             # <<<<<<<<<<<<<<
    8026             :  *         if self.obj is not None:
    8027             :  *             __Pyx_ReleaseBuffer(&self.view)
    8028             :  */
    8029             : 
    8030             :   /* function exit code */
    8031         141 : }
    8032             : 
    8033             : /* "View.MemoryView":397
    8034             :  *                 PyThread_free_lock(self.lock)
    8035             :  * 
    8036             :  *     cdef char *get_item_pointer(memoryview self, object index) except NULL:             # <<<<<<<<<<<<<<
    8037             :  *         cdef Py_ssize_t dim
    8038             :  *         cdef char *itemp = <char *> self.view.buf
    8039             :  */
    8040             : 
    8041           0 : static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
    8042           0 :   Py_ssize_t __pyx_v_dim;
    8043           0 :   char *__pyx_v_itemp;
    8044           0 :   PyObject *__pyx_v_idx = NULL;
    8045           0 :   char *__pyx_r;
    8046             :   __Pyx_RefNannyDeclarations
    8047           0 :   Py_ssize_t __pyx_t_1;
    8048           0 :   PyObject *__pyx_t_2 = NULL;
    8049           0 :   Py_ssize_t __pyx_t_3;
    8050           0 :   PyObject *(*__pyx_t_4)(PyObject *);
    8051           0 :   PyObject *__pyx_t_5 = NULL;
    8052           0 :   Py_ssize_t __pyx_t_6;
    8053           0 :   char *__pyx_t_7;
    8054           0 :   int __pyx_lineno = 0;
    8055           0 :   const char *__pyx_filename = NULL;
    8056           0 :   int __pyx_clineno = 0;
    8057           0 :   __Pyx_RefNannySetupContext("get_item_pointer", 1);
    8058             : 
    8059             :   /* "View.MemoryView":399
    8060             :  *     cdef char *get_item_pointer(memoryview self, object index) except NULL:
    8061             :  *         cdef Py_ssize_t dim
    8062             :  *         cdef char *itemp = <char *> self.view.buf             # <<<<<<<<<<<<<<
    8063             :  * 
    8064             :  *         for dim, idx in enumerate(index):
    8065             :  */
    8066           0 :   __pyx_v_itemp = ((char *)__pyx_v_self->view.buf);
    8067             : 
    8068             :   /* "View.MemoryView":401
    8069             :  *         cdef char *itemp = <char *> self.view.buf
    8070             :  * 
    8071             :  *         for dim, idx in enumerate(index):             # <<<<<<<<<<<<<<
    8072             :  *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
    8073             :  * 
    8074             :  */
    8075           0 :   __pyx_t_1 = 0;
    8076           0 :   if (likely(PyList_CheckExact(__pyx_v_index)) || PyTuple_CheckExact(__pyx_v_index)) {
    8077           0 :     __pyx_t_2 = __pyx_v_index; __Pyx_INCREF(__pyx_t_2);
    8078           0 :     __pyx_t_3 = 0;
    8079           0 :     __pyx_t_4 = NULL;
    8080             :   } else {
    8081           0 :     __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 401, __pyx_L1_error)
    8082           0 :     __Pyx_GOTREF(__pyx_t_2);
    8083           0 :     __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 401, __pyx_L1_error)
    8084             :   }
    8085           0 :   for (;;) {
    8086           0 :     if (likely(!__pyx_t_4)) {
    8087           0 :       if (likely(PyList_CheckExact(__pyx_t_2))) {
    8088             :         {
    8089           0 :           Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
    8090             :           #if !CYTHON_ASSUME_SAFE_MACROS
    8091             :           if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 401, __pyx_L1_error)
    8092             :           #endif
    8093           0 :           if (__pyx_t_3 >= __pyx_temp) break;
    8094             :         }
    8095             :         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    8096           0 :         __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(1, 401, __pyx_L1_error)
    8097             :         #else
    8098             :         __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 401, __pyx_L1_error)
    8099             :         __Pyx_GOTREF(__pyx_t_5);
    8100             :         #endif
    8101             :       } else {
    8102             :         {
    8103           0 :           Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
    8104             :           #if !CYTHON_ASSUME_SAFE_MACROS
    8105             :           if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 401, __pyx_L1_error)
    8106             :           #endif
    8107           0 :           if (__pyx_t_3 >= __pyx_temp) break;
    8108             :         }
    8109             :         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    8110           0 :         __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(1, 401, __pyx_L1_error)
    8111             :         #else
    8112             :         __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 401, __pyx_L1_error)
    8113             :         __Pyx_GOTREF(__pyx_t_5);
    8114             :         #endif
    8115             :       }
    8116             :     } else {
    8117           0 :       __pyx_t_5 = __pyx_t_4(__pyx_t_2);
    8118           0 :       if (unlikely(!__pyx_t_5)) {
    8119           0 :         PyObject* exc_type = PyErr_Occurred();
    8120           0 :         if (exc_type) {
    8121           0 :           if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
    8122           0 :           else __PYX_ERR(1, 401, __pyx_L1_error)
    8123             :         }
    8124             :         break;
    8125             :       }
    8126           0 :       __Pyx_GOTREF(__pyx_t_5);
    8127             :     }
    8128           0 :     __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5);
    8129           0 :     __pyx_t_5 = 0;
    8130           0 :     __pyx_v_dim = __pyx_t_1;
    8131           0 :     __pyx_t_1 = (__pyx_t_1 + 1);
    8132             : 
    8133             :     /* "View.MemoryView":402
    8134             :  * 
    8135             :  *         for dim, idx in enumerate(index):
    8136             :  *             itemp = pybuffer_index(&self.view, itemp, idx, dim)             # <<<<<<<<<<<<<<
    8137             :  * 
    8138             :  *         return itemp
    8139             :  */
    8140           0 :     __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 402, __pyx_L1_error)
    8141           0 :     __pyx_t_7 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_itemp, __pyx_t_6, __pyx_v_dim); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(1, 402, __pyx_L1_error)
    8142             :     __pyx_v_itemp = __pyx_t_7;
    8143             : 
    8144             :     /* "View.MemoryView":401
    8145             :  *         cdef char *itemp = <char *> self.view.buf
    8146             :  * 
    8147             :  *         for dim, idx in enumerate(index):             # <<<<<<<<<<<<<<
    8148             :  *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
    8149             :  * 
    8150             :  */
    8151             :   }
    8152           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    8153             : 
    8154             :   /* "View.MemoryView":404
    8155             :  *             itemp = pybuffer_index(&self.view, itemp, idx, dim)
    8156             :  * 
    8157             :  *         return itemp             # <<<<<<<<<<<<<<
    8158             :  * 
    8159             :  * 
    8160             :  */
    8161           0 :   __pyx_r = __pyx_v_itemp;
    8162           0 :   goto __pyx_L0;
    8163             : 
    8164             :   /* "View.MemoryView":397
    8165             :  *                 PyThread_free_lock(self.lock)
    8166             :  * 
    8167             :  *     cdef char *get_item_pointer(memoryview self, object index) except NULL:             # <<<<<<<<<<<<<<
    8168             :  *         cdef Py_ssize_t dim
    8169             :  *         cdef char *itemp = <char *> self.view.buf
    8170             :  */
    8171             : 
    8172             :   /* function exit code */
    8173           0 :   __pyx_L1_error:;
    8174           0 :   __Pyx_XDECREF(__pyx_t_2);
    8175           0 :   __Pyx_XDECREF(__pyx_t_5);
    8176           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.get_item_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
    8177           0 :   __pyx_r = NULL;
    8178           0 :   __pyx_L0:;
    8179           0 :   __Pyx_XDECREF(__pyx_v_idx);
    8180           0 :   __Pyx_RefNannyFinishContext();
    8181           0 :   return __pyx_r;
    8182             : }
    8183             : 
    8184             : /* "View.MemoryView":407
    8185             :  * 
    8186             :  * 
    8187             :  *     def __getitem__(memoryview self, object index):             # <<<<<<<<<<<<<<
    8188             :  *         if index is Ellipsis:
    8189             :  *             return self
    8190             :  */
    8191             : 
    8192             : /* Python wrapper */
    8193             : static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
    8194           0 : static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
    8195           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    8196           0 :   PyObject *__pyx_r = 0;
    8197             :   __Pyx_RefNannyDeclarations
    8198           0 :   __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
    8199           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    8200           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index));
    8201             : 
    8202             :   /* function exit code */
    8203           0 :   __Pyx_RefNannyFinishContext();
    8204           0 :   return __pyx_r;
    8205             : }
    8206             : 
    8207           0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
    8208           0 :   PyObject *__pyx_v_have_slices = NULL;
    8209           0 :   PyObject *__pyx_v_indices = NULL;
    8210           0 :   char *__pyx_v_itemp;
    8211           0 :   PyObject *__pyx_r = NULL;
    8212             :   __Pyx_RefNannyDeclarations
    8213           0 :   int __pyx_t_1;
    8214           0 :   PyObject *__pyx_t_2 = NULL;
    8215           0 :   PyObject *__pyx_t_3 = NULL;
    8216           0 :   PyObject *__pyx_t_4 = NULL;
    8217           0 :   char *__pyx_t_5;
    8218           0 :   int __pyx_lineno = 0;
    8219           0 :   const char *__pyx_filename = NULL;
    8220           0 :   int __pyx_clineno = 0;
    8221           0 :   __Pyx_RefNannySetupContext("__getitem__", 1);
    8222             : 
    8223             :   /* "View.MemoryView":408
    8224             :  * 
    8225             :  *     def __getitem__(memoryview self, object index):
    8226             :  *         if index is Ellipsis:             # <<<<<<<<<<<<<<
    8227             :  *             return self
    8228             :  * 
    8229             :  */
    8230           0 :   __pyx_t_1 = (__pyx_v_index == __pyx_builtin_Ellipsis);
    8231           0 :   if (__pyx_t_1) {
    8232             : 
    8233             :     /* "View.MemoryView":409
    8234             :  *     def __getitem__(memoryview self, object index):
    8235             :  *         if index is Ellipsis:
    8236             :  *             return self             # <<<<<<<<<<<<<<
    8237             :  * 
    8238             :  *         have_slices, indices = _unellipsify(index, self.view.ndim)
    8239             :  */
    8240           0 :     __Pyx_XDECREF(__pyx_r);
    8241           0 :     __Pyx_INCREF((PyObject *)__pyx_v_self);
    8242           0 :     __pyx_r = ((PyObject *)__pyx_v_self);
    8243           0 :     goto __pyx_L0;
    8244             : 
    8245             :     /* "View.MemoryView":408
    8246             :  * 
    8247             :  *     def __getitem__(memoryview self, object index):
    8248             :  *         if index is Ellipsis:             # <<<<<<<<<<<<<<
    8249             :  *             return self
    8250             :  * 
    8251             :  */
    8252             :   }
    8253             : 
    8254             :   /* "View.MemoryView":411
    8255             :  *             return self
    8256             :  * 
    8257             :  *         have_slices, indices = _unellipsify(index, self.view.ndim)             # <<<<<<<<<<<<<<
    8258             :  * 
    8259             :  *         cdef char *itemp
    8260             :  */
    8261           0 :   __pyx_t_2 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 411, __pyx_L1_error)
    8262           0 :   __Pyx_GOTREF(__pyx_t_2);
    8263           0 :   if (likely(__pyx_t_2 != Py_None)) {
    8264           0 :     PyObject* sequence = __pyx_t_2;
    8265           0 :     Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    8266           0 :     if (unlikely(size != 2)) {
    8267           0 :       if (size > 2) __Pyx_RaiseTooManyValuesError(2);
    8268           0 :       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
    8269           0 :       __PYX_ERR(1, 411, __pyx_L1_error)
    8270             :     }
    8271             :     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    8272           0 :     __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
    8273           0 :     __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
    8274           0 :     __Pyx_INCREF(__pyx_t_3);
    8275           0 :     __Pyx_INCREF(__pyx_t_4);
    8276             :     #else
    8277             :     __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 411, __pyx_L1_error)
    8278             :     __Pyx_GOTREF(__pyx_t_3);
    8279             :     __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 411, __pyx_L1_error)
    8280             :     __Pyx_GOTREF(__pyx_t_4);
    8281             :     #endif
    8282           0 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    8283             :   } else {
    8284           0 :     __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 411, __pyx_L1_error)
    8285             :   }
    8286           0 :   __pyx_v_have_slices = __pyx_t_3;
    8287           0 :   __pyx_t_3 = 0;
    8288           0 :   __pyx_v_indices = __pyx_t_4;
    8289           0 :   __pyx_t_4 = 0;
    8290             : 
    8291             :   /* "View.MemoryView":414
    8292             :  * 
    8293             :  *         cdef char *itemp
    8294             :  *         if have_slices:             # <<<<<<<<<<<<<<
    8295             :  *             return memview_slice(self, indices)
    8296             :  *         else:
    8297             :  */
    8298           0 :   __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 414, __pyx_L1_error)
    8299           0 :   if (__pyx_t_1) {
    8300             : 
    8301             :     /* "View.MemoryView":415
    8302             :  *         cdef char *itemp
    8303             :  *         if have_slices:
    8304             :  *             return memview_slice(self, indices)             # <<<<<<<<<<<<<<
    8305             :  *         else:
    8306             :  *             itemp = self.get_item_pointer(indices)
    8307             :  */
    8308           0 :     __Pyx_XDECREF(__pyx_r);
    8309           0 :     __pyx_t_2 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 415, __pyx_L1_error)
    8310           0 :     __Pyx_GOTREF(__pyx_t_2);
    8311           0 :     __pyx_r = __pyx_t_2;
    8312           0 :     __pyx_t_2 = 0;
    8313           0 :     goto __pyx_L0;
    8314             : 
    8315             :     /* "View.MemoryView":414
    8316             :  * 
    8317             :  *         cdef char *itemp
    8318             :  *         if have_slices:             # <<<<<<<<<<<<<<
    8319             :  *             return memview_slice(self, indices)
    8320             :  *         else:
    8321             :  */
    8322             :   }
    8323             : 
    8324             :   /* "View.MemoryView":417
    8325             :  *             return memview_slice(self, indices)
    8326             :  *         else:
    8327             :  *             itemp = self.get_item_pointer(indices)             # <<<<<<<<<<<<<<
    8328             :  *             return self.convert_item_to_object(itemp)
    8329             :  * 
    8330             :  */
    8331             :   /*else*/ {
    8332           0 :     __pyx_t_5 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_indices); if (unlikely(__pyx_t_5 == ((char *)NULL))) __PYX_ERR(1, 417, __pyx_L1_error)
    8333           0 :     __pyx_v_itemp = __pyx_t_5;
    8334             : 
    8335             :     /* "View.MemoryView":418
    8336             :  *         else:
    8337             :  *             itemp = self.get_item_pointer(indices)
    8338             :  *             return self.convert_item_to_object(itemp)             # <<<<<<<<<<<<<<
    8339             :  * 
    8340             :  *     def __setitem__(memoryview self, object index, object value):
    8341             :  */
    8342           0 :     __Pyx_XDECREF(__pyx_r);
    8343           0 :     __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->convert_item_to_object(__pyx_v_self, __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 418, __pyx_L1_error)
    8344           0 :     __Pyx_GOTREF(__pyx_t_2);
    8345           0 :     __pyx_r = __pyx_t_2;
    8346           0 :     __pyx_t_2 = 0;
    8347           0 :     goto __pyx_L0;
    8348             :   }
    8349             : 
    8350             :   /* "View.MemoryView":407
    8351             :  * 
    8352             :  * 
    8353             :  *     def __getitem__(memoryview self, object index):             # <<<<<<<<<<<<<<
    8354             :  *         if index is Ellipsis:
    8355             :  *             return self
    8356             :  */
    8357             : 
    8358             :   /* function exit code */
    8359           0 :   __pyx_L1_error:;
    8360           0 :   __Pyx_XDECREF(__pyx_t_2);
    8361           0 :   __Pyx_XDECREF(__pyx_t_3);
    8362           0 :   __Pyx_XDECREF(__pyx_t_4);
    8363           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    8364           0 :   __pyx_r = NULL;
    8365           0 :   __pyx_L0:;
    8366           0 :   __Pyx_XDECREF(__pyx_v_have_slices);
    8367           0 :   __Pyx_XDECREF(__pyx_v_indices);
    8368           0 :   __Pyx_XGIVEREF(__pyx_r);
    8369           0 :   __Pyx_RefNannyFinishContext();
    8370           0 :   return __pyx_r;
    8371             : }
    8372             : 
    8373             : /* "View.MemoryView":420
    8374             :  *             return self.convert_item_to_object(itemp)
    8375             :  * 
    8376             :  *     def __setitem__(memoryview self, object index, object value):             # <<<<<<<<<<<<<<
    8377             :  *         if self.view.readonly:
    8378             :  *             raise TypeError, "Cannot assign to read-only memoryview"
    8379             :  */
    8380             : 
    8381             : /* Python wrapper */
    8382             : static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/
    8383           0 : static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
    8384           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    8385           0 :   int __pyx_r;
    8386             :   __Pyx_RefNannyDeclarations
    8387           0 :   __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
    8388           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    8389           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value));
    8390             : 
    8391             :   /* function exit code */
    8392           0 :   __Pyx_RefNannyFinishContext();
    8393           0 :   return __pyx_r;
    8394             : }
    8395             : 
    8396           0 : static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
    8397           0 :   PyObject *__pyx_v_have_slices = NULL;
    8398           0 :   PyObject *__pyx_v_obj = NULL;
    8399           0 :   int __pyx_r;
    8400             :   __Pyx_RefNannyDeclarations
    8401           0 :   PyObject *__pyx_t_1 = NULL;
    8402           0 :   PyObject *__pyx_t_2 = NULL;
    8403           0 :   PyObject *__pyx_t_3 = NULL;
    8404           0 :   int __pyx_t_4;
    8405           0 :   int __pyx_lineno = 0;
    8406           0 :   const char *__pyx_filename = NULL;
    8407           0 :   int __pyx_clineno = 0;
    8408           0 :   __Pyx_RefNannySetupContext("__setitem__", 0);
    8409           0 :   __Pyx_INCREF(__pyx_v_index);
    8410             : 
    8411             :   /* "View.MemoryView":421
    8412             :  * 
    8413             :  *     def __setitem__(memoryview self, object index, object value):
    8414             :  *         if self.view.readonly:             # <<<<<<<<<<<<<<
    8415             :  *             raise TypeError, "Cannot assign to read-only memoryview"
    8416             :  * 
    8417             :  */
    8418           0 :   if (unlikely(__pyx_v_self->view.readonly)) {
    8419             : 
    8420             :     /* "View.MemoryView":422
    8421             :  *     def __setitem__(memoryview self, object index, object value):
    8422             :  *         if self.view.readonly:
    8423             :  *             raise TypeError, "Cannot assign to read-only memoryview"             # <<<<<<<<<<<<<<
    8424             :  * 
    8425             :  *         have_slices, index = _unellipsify(index, self.view.ndim)
    8426             :  */
    8427           0 :     __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_Cannot_assign_to_read_only_memor, 0, 0);
    8428           0 :     __PYX_ERR(1, 422, __pyx_L1_error)
    8429             : 
    8430             :     /* "View.MemoryView":421
    8431             :  * 
    8432             :  *     def __setitem__(memoryview self, object index, object value):
    8433             :  *         if self.view.readonly:             # <<<<<<<<<<<<<<
    8434             :  *             raise TypeError, "Cannot assign to read-only memoryview"
    8435             :  * 
    8436             :  */
    8437             :   }
    8438             : 
    8439             :   /* "View.MemoryView":424
    8440             :  *             raise TypeError, "Cannot assign to read-only memoryview"
    8441             :  * 
    8442             :  *         have_slices, index = _unellipsify(index, self.view.ndim)             # <<<<<<<<<<<<<<
    8443             :  * 
    8444             :  *         if have_slices:
    8445             :  */
    8446           0 :   __pyx_t_1 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 424, __pyx_L1_error)
    8447           0 :   __Pyx_GOTREF(__pyx_t_1);
    8448           0 :   if (likely(__pyx_t_1 != Py_None)) {
    8449           0 :     PyObject* sequence = __pyx_t_1;
    8450           0 :     Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    8451           0 :     if (unlikely(size != 2)) {
    8452           0 :       if (size > 2) __Pyx_RaiseTooManyValuesError(2);
    8453           0 :       else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
    8454           0 :       __PYX_ERR(1, 424, __pyx_L1_error)
    8455             :     }
    8456             :     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    8457           0 :     __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
    8458           0 :     __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    8459           0 :     __Pyx_INCREF(__pyx_t_2);
    8460           0 :     __Pyx_INCREF(__pyx_t_3);
    8461             :     #else
    8462             :     __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 424, __pyx_L1_error)
    8463             :     __Pyx_GOTREF(__pyx_t_2);
    8464             :     __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 424, __pyx_L1_error)
    8465             :     __Pyx_GOTREF(__pyx_t_3);
    8466             :     #endif
    8467           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    8468             :   } else {
    8469           0 :     __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 424, __pyx_L1_error)
    8470             :   }
    8471           0 :   __pyx_v_have_slices = __pyx_t_2;
    8472           0 :   __pyx_t_2 = 0;
    8473           0 :   __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_3);
    8474           0 :   __pyx_t_3 = 0;
    8475             : 
    8476             :   /* "View.MemoryView":426
    8477             :  *         have_slices, index = _unellipsify(index, self.view.ndim)
    8478             :  * 
    8479             :  *         if have_slices:             # <<<<<<<<<<<<<<
    8480             :  *             obj = self.is_slice(value)
    8481             :  *             if obj is not None:
    8482             :  */
    8483           0 :   __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(1, 426, __pyx_L1_error)
    8484           0 :   if (__pyx_t_4) {
    8485             : 
    8486             :     /* "View.MemoryView":427
    8487             :  * 
    8488             :  *         if have_slices:
    8489             :  *             obj = self.is_slice(value)             # <<<<<<<<<<<<<<
    8490             :  *             if obj is not None:
    8491             :  *                 self.setitem_slice_assignment(self[index], obj)
    8492             :  */
    8493           0 :     __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 427, __pyx_L1_error)
    8494           0 :     __Pyx_GOTREF(__pyx_t_1);
    8495           0 :     __pyx_v_obj = __pyx_t_1;
    8496           0 :     __pyx_t_1 = 0;
    8497             : 
    8498             :     /* "View.MemoryView":428
    8499             :  *         if have_slices:
    8500             :  *             obj = self.is_slice(value)
    8501             :  *             if obj is not None:             # <<<<<<<<<<<<<<
    8502             :  *                 self.setitem_slice_assignment(self[index], obj)
    8503             :  *             else:
    8504             :  */
    8505           0 :     __pyx_t_4 = (__pyx_v_obj != Py_None);
    8506           0 :     if (__pyx_t_4) {
    8507             : 
    8508             :       /* "View.MemoryView":429
    8509             :  *             obj = self.is_slice(value)
    8510             :  *             if obj is not None:
    8511             :  *                 self.setitem_slice_assignment(self[index], obj)             # <<<<<<<<<<<<<<
    8512             :  *             else:
    8513             :  *                 self.setitem_slice_assign_scalar(self[index], value)
    8514             :  */
    8515           0 :       __pyx_t_1 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 429, __pyx_L1_error)
    8516           0 :       __Pyx_GOTREF(__pyx_t_1);
    8517           0 :       __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assignment(__pyx_v_self, __pyx_t_1, __pyx_v_obj); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 429, __pyx_L1_error)
    8518           0 :       __Pyx_GOTREF(__pyx_t_3);
    8519           0 :       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    8520           0 :       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    8521             : 
    8522             :       /* "View.MemoryView":428
    8523             :  *         if have_slices:
    8524             :  *             obj = self.is_slice(value)
    8525             :  *             if obj is not None:             # <<<<<<<<<<<<<<
    8526             :  *                 self.setitem_slice_assignment(self[index], obj)
    8527             :  *             else:
    8528             :  */
    8529           0 :       goto __pyx_L5;
    8530             :     }
    8531             : 
    8532             :     /* "View.MemoryView":431
    8533             :  *                 self.setitem_slice_assignment(self[index], obj)
    8534             :  *             else:
    8535             :  *                 self.setitem_slice_assign_scalar(self[index], value)             # <<<<<<<<<<<<<<
    8536             :  *         else:
    8537             :  *             self.setitem_indexed(index, value)
    8538             :  */
    8539             :     /*else*/ {
    8540           0 :       __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 431, __pyx_L1_error)
    8541           0 :       __Pyx_GOTREF(__pyx_t_3);
    8542           0 :       if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(1, 431, __pyx_L1_error)
    8543           0 :       __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assign_scalar(__pyx_v_self, ((struct __pyx_memoryview_obj *)__pyx_t_3), __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 431, __pyx_L1_error)
    8544           0 :       __Pyx_GOTREF(__pyx_t_1);
    8545           0 :       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    8546           0 :       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    8547             :     }
    8548           0 :     __pyx_L5:;
    8549             : 
    8550             :     /* "View.MemoryView":426
    8551             :  *         have_slices, index = _unellipsify(index, self.view.ndim)
    8552             :  * 
    8553             :  *         if have_slices:             # <<<<<<<<<<<<<<
    8554             :  *             obj = self.is_slice(value)
    8555             :  *             if obj is not None:
    8556             :  */
    8557           0 :     goto __pyx_L4;
    8558             :   }
    8559             : 
    8560             :   /* "View.MemoryView":433
    8561             :  *                 self.setitem_slice_assign_scalar(self[index], value)
    8562             :  *         else:
    8563             :  *             self.setitem_indexed(index, value)             # <<<<<<<<<<<<<<
    8564             :  * 
    8565             :  *     cdef is_slice(self, obj):
    8566             :  */
    8567             :   /*else*/ {
    8568           0 :     __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_indexed(__pyx_v_self, __pyx_v_index, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 433, __pyx_L1_error)
    8569           0 :     __Pyx_GOTREF(__pyx_t_1);
    8570           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    8571             :   }
    8572           0 :   __pyx_L4:;
    8573             : 
    8574             :   /* "View.MemoryView":420
    8575             :  *             return self.convert_item_to_object(itemp)
    8576             :  * 
    8577             :  *     def __setitem__(memoryview self, object index, object value):             # <<<<<<<<<<<<<<
    8578             :  *         if self.view.readonly:
    8579             :  *             raise TypeError, "Cannot assign to read-only memoryview"
    8580             :  */
    8581             : 
    8582             :   /* function exit code */
    8583           0 :   __pyx_r = 0;
    8584           0 :   goto __pyx_L0;
    8585           0 :   __pyx_L1_error:;
    8586           0 :   __Pyx_XDECREF(__pyx_t_1);
    8587           0 :   __Pyx_XDECREF(__pyx_t_2);
    8588           0 :   __Pyx_XDECREF(__pyx_t_3);
    8589           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
    8590           0 :   __pyx_r = -1;
    8591           0 :   __pyx_L0:;
    8592           0 :   __Pyx_XDECREF(__pyx_v_have_slices);
    8593           0 :   __Pyx_XDECREF(__pyx_v_obj);
    8594           0 :   __Pyx_XDECREF(__pyx_v_index);
    8595           0 :   __Pyx_RefNannyFinishContext();
    8596           0 :   return __pyx_r;
    8597             : }
    8598             : 
    8599             : /* "View.MemoryView":435
    8600             :  *             self.setitem_indexed(index, value)
    8601             :  * 
    8602             :  *     cdef is_slice(self, obj):             # <<<<<<<<<<<<<<
    8603             :  *         if not isinstance(obj, memoryview):
    8604             :  *             try:
    8605             :  */
    8606             : 
    8607           0 : static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj) {
    8608           0 :   PyObject *__pyx_r = NULL;
    8609             :   __Pyx_RefNannyDeclarations
    8610           0 :   int __pyx_t_1;
    8611           0 :   int __pyx_t_2;
    8612           0 :   PyObject *__pyx_t_3 = NULL;
    8613           0 :   PyObject *__pyx_t_4 = NULL;
    8614           0 :   PyObject *__pyx_t_5 = NULL;
    8615           0 :   PyObject *__pyx_t_6 = NULL;
    8616           0 :   PyObject *__pyx_t_7 = NULL;
    8617           0 :   PyObject *__pyx_t_8 = NULL;
    8618           0 :   int __pyx_t_9;
    8619           0 :   int __pyx_lineno = 0;
    8620           0 :   const char *__pyx_filename = NULL;
    8621           0 :   int __pyx_clineno = 0;
    8622           0 :   __Pyx_RefNannySetupContext("is_slice", 0);
    8623           0 :   __Pyx_INCREF(__pyx_v_obj);
    8624             : 
    8625             :   /* "View.MemoryView":436
    8626             :  * 
    8627             :  *     cdef is_slice(self, obj):
    8628             :  *         if not isinstance(obj, memoryview):             # <<<<<<<<<<<<<<
    8629             :  *             try:
    8630             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
    8631             :  */
    8632           0 :   __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_memoryview_type); 
    8633           0 :   __pyx_t_2 = (!__pyx_t_1);
    8634           0 :   if (__pyx_t_2) {
    8635             : 
    8636             :     /* "View.MemoryView":437
    8637             :  *     cdef is_slice(self, obj):
    8638             :  *         if not isinstance(obj, memoryview):
    8639             :  *             try:             # <<<<<<<<<<<<<<
    8640             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
    8641             :  *                                  self.dtype_is_object)
    8642             :  */
    8643             :     {
    8644           0 :       __Pyx_PyThreadState_declare
    8645           0 :       __Pyx_PyThreadState_assign
    8646           0 :       __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
    8647           0 :       __Pyx_XGOTREF(__pyx_t_3);
    8648           0 :       __Pyx_XGOTREF(__pyx_t_4);
    8649           0 :       __Pyx_XGOTREF(__pyx_t_5);
    8650             :       /*try:*/ {
    8651             : 
    8652             :         /* "View.MemoryView":438
    8653             :  *         if not isinstance(obj, memoryview):
    8654             :  *             try:
    8655             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,             # <<<<<<<<<<<<<<
    8656             :  *                                  self.dtype_is_object)
    8657             :  *             except TypeError:
    8658             :  */
    8659           0 :         __pyx_t_6 = __Pyx_PyInt_From_int(((__pyx_v_self->flags & (~PyBUF_WRITABLE)) | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 438, __pyx_L4_error)
    8660           0 :         __Pyx_GOTREF(__pyx_t_6);
    8661             : 
    8662             :         /* "View.MemoryView":439
    8663             :  *             try:
    8664             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
    8665             :  *                                  self.dtype_is_object)             # <<<<<<<<<<<<<<
    8666             :  *             except TypeError:
    8667             :  *                 return None
    8668             :  */
    8669           0 :         __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 439, __pyx_L4_error)
    8670           0 :         __Pyx_GOTREF(__pyx_t_7);
    8671             : 
    8672             :         /* "View.MemoryView":438
    8673             :  *         if not isinstance(obj, memoryview):
    8674             :  *             try:
    8675             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,             # <<<<<<<<<<<<<<
    8676             :  *                                  self.dtype_is_object)
    8677             :  *             except TypeError:
    8678             :  */
    8679           0 :         __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 438, __pyx_L4_error)
    8680           0 :         __Pyx_GOTREF(__pyx_t_8);
    8681           0 :         __Pyx_INCREF(__pyx_v_obj);
    8682           0 :         __Pyx_GIVEREF(__pyx_v_obj);
    8683           0 :         if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_obj)) __PYX_ERR(1, 438, __pyx_L4_error);
    8684           0 :         __Pyx_GIVEREF(__pyx_t_6);
    8685           0 :         if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6)) __PYX_ERR(1, 438, __pyx_L4_error);
    8686           0 :         __Pyx_GIVEREF(__pyx_t_7);
    8687           0 :         if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7)) __PYX_ERR(1, 438, __pyx_L4_error);
    8688           0 :         __pyx_t_6 = 0;
    8689           0 :         __pyx_t_7 = 0;
    8690           0 :         __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 438, __pyx_L4_error)
    8691           0 :         __Pyx_GOTREF(__pyx_t_7);
    8692           0 :         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    8693           0 :         __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_7);
    8694           0 :         __pyx_t_7 = 0;
    8695             : 
    8696             :         /* "View.MemoryView":437
    8697             :  *     cdef is_slice(self, obj):
    8698             :  *         if not isinstance(obj, memoryview):
    8699             :  *             try:             # <<<<<<<<<<<<<<
    8700             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
    8701             :  *                                  self.dtype_is_object)
    8702             :  */
    8703             :       }
    8704           0 :       __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    8705           0 :       __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    8706           0 :       __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    8707           0 :       goto __pyx_L9_try_end;
    8708           0 :       __pyx_L4_error:;
    8709           0 :       __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    8710           0 :       __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    8711           0 :       __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    8712             : 
    8713             :       /* "View.MemoryView":440
    8714             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
    8715             :  *                                  self.dtype_is_object)
    8716             :  *             except TypeError:             # <<<<<<<<<<<<<<
    8717             :  *                 return None
    8718             :  * 
    8719             :  */
    8720           0 :       __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
    8721           0 :       if (__pyx_t_9) {
    8722           0 :         __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
    8723           0 :         if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(1, 440, __pyx_L6_except_error)
    8724           0 :         __Pyx_XGOTREF(__pyx_t_7);
    8725           0 :         __Pyx_XGOTREF(__pyx_t_8);
    8726           0 :         __Pyx_XGOTREF(__pyx_t_6);
    8727             : 
    8728             :         /* "View.MemoryView":441
    8729             :  *                                  self.dtype_is_object)
    8730             :  *             except TypeError:
    8731             :  *                 return None             # <<<<<<<<<<<<<<
    8732             :  * 
    8733             :  *         return obj
    8734             :  */
    8735           0 :         __Pyx_XDECREF(__pyx_r);
    8736           0 :         __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    8737           0 :         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    8738           0 :         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    8739           0 :         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    8740           0 :         goto __pyx_L7_except_return;
    8741             :       }
    8742           0 :       goto __pyx_L6_except_error;
    8743             : 
    8744             :       /* "View.MemoryView":437
    8745             :  *     cdef is_slice(self, obj):
    8746             :  *         if not isinstance(obj, memoryview):
    8747             :  *             try:             # <<<<<<<<<<<<<<
    8748             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
    8749             :  *                                  self.dtype_is_object)
    8750             :  */
    8751           0 :       __pyx_L6_except_error:;
    8752           0 :       __Pyx_XGIVEREF(__pyx_t_3);
    8753           0 :       __Pyx_XGIVEREF(__pyx_t_4);
    8754           0 :       __Pyx_XGIVEREF(__pyx_t_5);
    8755           0 :       __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    8756           0 :       goto __pyx_L1_error;
    8757           0 :       __pyx_L7_except_return:;
    8758           0 :       __Pyx_XGIVEREF(__pyx_t_3);
    8759           0 :       __Pyx_XGIVEREF(__pyx_t_4);
    8760           0 :       __Pyx_XGIVEREF(__pyx_t_5);
    8761           0 :       __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    8762           0 :       goto __pyx_L0;
    8763           0 :       __pyx_L9_try_end:;
    8764             :     }
    8765             : 
    8766             :     /* "View.MemoryView":436
    8767             :  * 
    8768             :  *     cdef is_slice(self, obj):
    8769             :  *         if not isinstance(obj, memoryview):             # <<<<<<<<<<<<<<
    8770             :  *             try:
    8771             :  *                 obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
    8772             :  */
    8773             :   }
    8774             : 
    8775             :   /* "View.MemoryView":443
    8776             :  *                 return None
    8777             :  * 
    8778             :  *         return obj             # <<<<<<<<<<<<<<
    8779             :  * 
    8780             :  *     cdef setitem_slice_assignment(self, dst, src):
    8781             :  */
    8782           0 :   __Pyx_XDECREF(__pyx_r);
    8783           0 :   __Pyx_INCREF(__pyx_v_obj);
    8784           0 :   __pyx_r = __pyx_v_obj;
    8785           0 :   goto __pyx_L0;
    8786             : 
    8787             :   /* "View.MemoryView":435
    8788             :  *             self.setitem_indexed(index, value)
    8789             :  * 
    8790             :  *     cdef is_slice(self, obj):             # <<<<<<<<<<<<<<
    8791             :  *         if not isinstance(obj, memoryview):
    8792             :  *             try:
    8793             :  */
    8794             : 
    8795             :   /* function exit code */
    8796           0 :   __pyx_L1_error:;
    8797           0 :   __Pyx_XDECREF(__pyx_t_6);
    8798           0 :   __Pyx_XDECREF(__pyx_t_7);
    8799           0 :   __Pyx_XDECREF(__pyx_t_8);
    8800           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
    8801           0 :   __pyx_r = 0;
    8802           0 :   __pyx_L0:;
    8803           0 :   __Pyx_XDECREF(__pyx_v_obj);
    8804           0 :   __Pyx_XGIVEREF(__pyx_r);
    8805           0 :   __Pyx_RefNannyFinishContext();
    8806           0 :   return __pyx_r;
    8807             : }
    8808             : 
    8809             : /* "View.MemoryView":445
    8810             :  *         return obj
    8811             :  * 
    8812             :  *     cdef setitem_slice_assignment(self, dst, src):             # <<<<<<<<<<<<<<
    8813             :  *         cdef __Pyx_memviewslice dst_slice
    8814             :  *         cdef __Pyx_memviewslice src_slice
    8815             :  */
    8816             : 
    8817           0 : static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src) {
    8818           0 :   __Pyx_memviewslice __pyx_v_dst_slice;
    8819           0 :   __Pyx_memviewslice __pyx_v_src_slice;
    8820           0 :   __Pyx_memviewslice __pyx_v_msrc;
    8821           0 :   __Pyx_memviewslice __pyx_v_mdst;
    8822           0 :   PyObject *__pyx_r = NULL;
    8823             :   __Pyx_RefNannyDeclarations
    8824           0 :   __Pyx_memviewslice *__pyx_t_1;
    8825           0 :   PyObject *__pyx_t_2 = NULL;
    8826           0 :   int __pyx_t_3;
    8827           0 :   int __pyx_t_4;
    8828           0 :   int __pyx_t_5;
    8829           0 :   int __pyx_lineno = 0;
    8830           0 :   const char *__pyx_filename = NULL;
    8831           0 :   int __pyx_clineno = 0;
    8832           0 :   __Pyx_RefNannySetupContext("setitem_slice_assignment", 1);
    8833             : 
    8834             :   /* "View.MemoryView":448
    8835             :  *         cdef __Pyx_memviewslice dst_slice
    8836             :  *         cdef __Pyx_memviewslice src_slice
    8837             :  *         cdef __Pyx_memviewslice msrc = get_slice_from_memview(src, &src_slice)[0]             # <<<<<<<<<<<<<<
    8838             :  *         cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0]
    8839             :  * 
    8840             :  */
    8841           0 :   if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_memoryview_type))))) __PYX_ERR(1, 448, __pyx_L1_error)
    8842           0 :   __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_src), (&__pyx_v_src_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 448, __pyx_L1_error)
    8843           0 :   __pyx_v_msrc = (__pyx_t_1[0]);
    8844             : 
    8845             :   /* "View.MemoryView":449
    8846             :  *         cdef __Pyx_memviewslice src_slice
    8847             :  *         cdef __Pyx_memviewslice msrc = get_slice_from_memview(src, &src_slice)[0]
    8848             :  *         cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0]             # <<<<<<<<<<<<<<
    8849             :  * 
    8850             :  *         memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object)
    8851             :  */
    8852           0 :   if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_memoryview_type))))) __PYX_ERR(1, 449, __pyx_L1_error)
    8853           0 :   __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_dst), (&__pyx_v_dst_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 449, __pyx_L1_error)
    8854           0 :   __pyx_v_mdst = (__pyx_t_1[0]);
    8855             : 
    8856             :   /* "View.MemoryView":451
    8857             :  *         cdef __Pyx_memviewslice mdst = get_slice_from_memview(dst, &dst_slice)[0]
    8858             :  * 
    8859             :  *         memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object)             # <<<<<<<<<<<<<<
    8860             :  * 
    8861             :  *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):
    8862             :  */
    8863           0 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_n_s_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 451, __pyx_L1_error)
    8864           0 :   __Pyx_GOTREF(__pyx_t_2);
    8865           0 :   __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 451, __pyx_L1_error)
    8866           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    8867           0 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_n_s_ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 451, __pyx_L1_error)
    8868           0 :   __Pyx_GOTREF(__pyx_t_2);
    8869           0 :   __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 451, __pyx_L1_error)
    8870           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    8871           0 :   __pyx_t_5 = __pyx_memoryview_copy_contents(__pyx_v_msrc, __pyx_v_mdst, __pyx_t_3, __pyx_t_4, __pyx_v_self->dtype_is_object); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 451, __pyx_L1_error)
    8872             : 
    8873             :   /* "View.MemoryView":445
    8874             :  *         return obj
    8875             :  * 
    8876             :  *     cdef setitem_slice_assignment(self, dst, src):             # <<<<<<<<<<<<<<
    8877             :  *         cdef __Pyx_memviewslice dst_slice
    8878             :  *         cdef __Pyx_memviewslice src_slice
    8879             :  */
    8880             : 
    8881             :   /* function exit code */
    8882           0 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    8883           0 :   goto __pyx_L0;
    8884           0 :   __pyx_L1_error:;
    8885           0 :   __Pyx_XDECREF(__pyx_t_2);
    8886           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assignment", __pyx_clineno, __pyx_lineno, __pyx_filename);
    8887           0 :   __pyx_r = 0;
    8888           0 :   __pyx_L0:;
    8889           0 :   __Pyx_XGIVEREF(__pyx_r);
    8890           0 :   __Pyx_RefNannyFinishContext();
    8891           0 :   return __pyx_r;
    8892             : }
    8893             : 
    8894             : /* "View.MemoryView":453
    8895             :  *         memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object)
    8896             :  * 
    8897             :  *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):             # <<<<<<<<<<<<<<
    8898             :  *         cdef int array[128]
    8899             :  *         cdef void *tmp = NULL
    8900             :  */
    8901             : 
    8902           0 : static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value) {
    8903           0 :   int __pyx_v_array[0x80];
    8904           0 :   void *__pyx_v_tmp;
    8905           0 :   void *__pyx_v_item;
    8906           0 :   __Pyx_memviewslice *__pyx_v_dst_slice;
    8907           0 :   __Pyx_memviewslice __pyx_v_tmp_slice;
    8908           0 :   PyObject *__pyx_r = NULL;
    8909             :   __Pyx_RefNannyDeclarations
    8910           0 :   __Pyx_memviewslice *__pyx_t_1;
    8911           0 :   int __pyx_t_2;
    8912           0 :   PyObject *__pyx_t_3 = NULL;
    8913           0 :   int __pyx_t_4;
    8914           0 :   int __pyx_t_5;
    8915           0 :   char const *__pyx_t_6;
    8916           0 :   PyObject *__pyx_t_7 = NULL;
    8917           0 :   PyObject *__pyx_t_8 = NULL;
    8918           0 :   PyObject *__pyx_t_9 = NULL;
    8919           0 :   PyObject *__pyx_t_10 = NULL;
    8920           0 :   PyObject *__pyx_t_11 = NULL;
    8921           0 :   PyObject *__pyx_t_12 = NULL;
    8922           0 :   int __pyx_lineno = 0;
    8923           0 :   const char *__pyx_filename = NULL;
    8924           0 :   int __pyx_clineno = 0;
    8925           0 :   __Pyx_RefNannySetupContext("setitem_slice_assign_scalar", 1);
    8926             : 
    8927             :   /* "View.MemoryView":455
    8928             :  *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):
    8929             :  *         cdef int array[128]
    8930             :  *         cdef void *tmp = NULL             # <<<<<<<<<<<<<<
    8931             :  *         cdef void *item
    8932             :  * 
    8933             :  */
    8934           0 :   __pyx_v_tmp = NULL;
    8935             : 
    8936             :   /* "View.MemoryView":460
    8937             :  *         cdef __Pyx_memviewslice *dst_slice
    8938             :  *         cdef __Pyx_memviewslice tmp_slice
    8939             :  *         dst_slice = get_slice_from_memview(dst, &tmp_slice)             # <<<<<<<<<<<<<<
    8940             :  * 
    8941             :  *         if <size_t>self.view.itemsize > sizeof(array):
    8942             :  */
    8943           0 :   __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_dst, (&__pyx_v_tmp_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 460, __pyx_L1_error)
    8944           0 :   __pyx_v_dst_slice = __pyx_t_1;
    8945             : 
    8946             :   /* "View.MemoryView":462
    8947             :  *         dst_slice = get_slice_from_memview(dst, &tmp_slice)
    8948             :  * 
    8949             :  *         if <size_t>self.view.itemsize > sizeof(array):             # <<<<<<<<<<<<<<
    8950             :  *             tmp = PyMem_Malloc(self.view.itemsize)
    8951             :  *             if tmp == NULL:
    8952             :  */
    8953           0 :   __pyx_t_2 = (((size_t)__pyx_v_self->view.itemsize) > (sizeof(__pyx_v_array)));
    8954           0 :   if (__pyx_t_2) {
    8955             : 
    8956             :     /* "View.MemoryView":463
    8957             :  * 
    8958             :  *         if <size_t>self.view.itemsize > sizeof(array):
    8959             :  *             tmp = PyMem_Malloc(self.view.itemsize)             # <<<<<<<<<<<<<<
    8960             :  *             if tmp == NULL:
    8961             :  *                 raise MemoryError
    8962             :  */
    8963           0 :     __pyx_v_tmp = PyMem_Malloc(__pyx_v_self->view.itemsize);
    8964             : 
    8965             :     /* "View.MemoryView":464
    8966             :  *         if <size_t>self.view.itemsize > sizeof(array):
    8967             :  *             tmp = PyMem_Malloc(self.view.itemsize)
    8968             :  *             if tmp == NULL:             # <<<<<<<<<<<<<<
    8969             :  *                 raise MemoryError
    8970             :  *             item = tmp
    8971             :  */
    8972           0 :     __pyx_t_2 = (__pyx_v_tmp == NULL);
    8973           0 :     if (unlikely(__pyx_t_2)) {
    8974             : 
    8975             :       /* "View.MemoryView":465
    8976             :  *             tmp = PyMem_Malloc(self.view.itemsize)
    8977             :  *             if tmp == NULL:
    8978             :  *                 raise MemoryError             # <<<<<<<<<<<<<<
    8979             :  *             item = tmp
    8980             :  *         else:
    8981             :  */
    8982           0 :       PyErr_NoMemory(); __PYX_ERR(1, 465, __pyx_L1_error)
    8983             : 
    8984             :       /* "View.MemoryView":464
    8985             :  *         if <size_t>self.view.itemsize > sizeof(array):
    8986             :  *             tmp = PyMem_Malloc(self.view.itemsize)
    8987             :  *             if tmp == NULL:             # <<<<<<<<<<<<<<
    8988             :  *                 raise MemoryError
    8989             :  *             item = tmp
    8990             :  */
    8991             :     }
    8992             : 
    8993             :     /* "View.MemoryView":466
    8994             :  *             if tmp == NULL:
    8995             :  *                 raise MemoryError
    8996             :  *             item = tmp             # <<<<<<<<<<<<<<
    8997             :  *         else:
    8998             :  *             item = <void *> array
    8999             :  */
    9000           0 :     __pyx_v_item = __pyx_v_tmp;
    9001             : 
    9002             :     /* "View.MemoryView":462
    9003             :  *         dst_slice = get_slice_from_memview(dst, &tmp_slice)
    9004             :  * 
    9005             :  *         if <size_t>self.view.itemsize > sizeof(array):             # <<<<<<<<<<<<<<
    9006             :  *             tmp = PyMem_Malloc(self.view.itemsize)
    9007             :  *             if tmp == NULL:
    9008             :  */
    9009           0 :     goto __pyx_L3;
    9010             :   }
    9011             : 
    9012             :   /* "View.MemoryView":468
    9013             :  *             item = tmp
    9014             :  *         else:
    9015             :  *             item = <void *> array             # <<<<<<<<<<<<<<
    9016             :  * 
    9017             :  *         try:
    9018             :  */
    9019             :   /*else*/ {
    9020             :     __pyx_v_item = ((void *)__pyx_v_array);
    9021             :   }
    9022           0 :   __pyx_L3:;
    9023             : 
    9024             :   /* "View.MemoryView":470
    9025             :  *             item = <void *> array
    9026             :  * 
    9027             :  *         try:             # <<<<<<<<<<<<<<
    9028             :  *             if self.dtype_is_object:
    9029             :  *                 (<PyObject **> item)[0] = <PyObject *> value
    9030             :  */
    9031             :   /*try:*/ {
    9032             : 
    9033             :     /* "View.MemoryView":471
    9034             :  * 
    9035             :  *         try:
    9036             :  *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
    9037             :  *                 (<PyObject **> item)[0] = <PyObject *> value
    9038             :  *             else:
    9039             :  */
    9040           0 :     if (__pyx_v_self->dtype_is_object) {
    9041             : 
    9042             :       /* "View.MemoryView":472
    9043             :  *         try:
    9044             :  *             if self.dtype_is_object:
    9045             :  *                 (<PyObject **> item)[0] = <PyObject *> value             # <<<<<<<<<<<<<<
    9046             :  *             else:
    9047             :  *                 self.assign_item_from_object(<char *> item, value)
    9048             :  */
    9049           0 :       (((PyObject **)__pyx_v_item)[0]) = ((PyObject *)__pyx_v_value);
    9050             : 
    9051             :       /* "View.MemoryView":471
    9052             :  * 
    9053             :  *         try:
    9054             :  *             if self.dtype_is_object:             # <<<<<<<<<<<<<<
    9055             :  *                 (<PyObject **> item)[0] = <PyObject *> value
    9056             :  *             else:
    9057             :  */
    9058           0 :       goto __pyx_L8;
    9059             :     }
    9060             : 
    9061             :     /* "View.MemoryView":474
    9062             :  *                 (<PyObject **> item)[0] = <PyObject *> value
    9063             :  *             else:
    9064             :  *                 self.assign_item_from_object(<char *> item, value)             # <<<<<<<<<<<<<<
    9065             :  * 
    9066             :  * 
    9067             :  */
    9068             :     /*else*/ {
    9069           0 :       __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, ((char *)__pyx_v_item), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 474, __pyx_L6_error)
    9070           0 :       __Pyx_GOTREF(__pyx_t_3);
    9071           0 :       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    9072             :     }
    9073           0 :     __pyx_L8:;
    9074             : 
    9075             :     /* "View.MemoryView":478
    9076             :  * 
    9077             :  * 
    9078             :  *             if self.view.suboffsets != NULL:             # <<<<<<<<<<<<<<
    9079             :  *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
    9080             :  *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
    9081             :  */
    9082           0 :     __pyx_t_2 = (__pyx_v_self->view.suboffsets != NULL);
    9083           0 :     if (__pyx_t_2) {
    9084             : 
    9085             :       /* "View.MemoryView":479
    9086             :  * 
    9087             :  *             if self.view.suboffsets != NULL:
    9088             :  *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)             # <<<<<<<<<<<<<<
    9089             :  *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
    9090             :  *                                 item, self.dtype_is_object)
    9091             :  */
    9092           0 :       __pyx_t_4 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 479, __pyx_L6_error)
    9093             : 
    9094             :       /* "View.MemoryView":478
    9095             :  * 
    9096             :  * 
    9097             :  *             if self.view.suboffsets != NULL:             # <<<<<<<<<<<<<<
    9098             :  *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
    9099             :  *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
    9100             :  */
    9101             :     }
    9102             : 
    9103             :     /* "View.MemoryView":480
    9104             :  *             if self.view.suboffsets != NULL:
    9105             :  *                 assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
    9106             :  *             slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,             # <<<<<<<<<<<<<<
    9107             :  *                                 item, self.dtype_is_object)
    9108             :  *         finally:
    9109             :  */
    9110           0 :     __pyx_memoryview_slice_assign_scalar(__pyx_v_dst_slice, __pyx_v_dst->view.ndim, __pyx_v_self->view.itemsize, __pyx_v_item, __pyx_v_self->dtype_is_object);
    9111             :   }
    9112             : 
    9113             :   /* "View.MemoryView":483
    9114             :  *                                 item, self.dtype_is_object)
    9115             :  *         finally:
    9116             :  *             PyMem_Free(tmp)             # <<<<<<<<<<<<<<
    9117             :  * 
    9118             :  *     cdef setitem_indexed(self, index, value):
    9119             :  */
    9120             :   /*finally:*/ {
    9121             :     /*normal exit:*/{
    9122           0 :       PyMem_Free(__pyx_v_tmp);
    9123           0 :       goto __pyx_L7;
    9124             :     }
    9125           0 :     __pyx_L6_error:;
    9126             :     /*exception exit:*/{
    9127           0 :       __Pyx_PyThreadState_declare
    9128           0 :       __Pyx_PyThreadState_assign
    9129           0 :       __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
    9130           0 :       __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    9131           0 :       if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
    9132           0 :       if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
    9133           0 :       __Pyx_XGOTREF(__pyx_t_7);
    9134           0 :       __Pyx_XGOTREF(__pyx_t_8);
    9135           0 :       __Pyx_XGOTREF(__pyx_t_9);
    9136           0 :       __Pyx_XGOTREF(__pyx_t_10);
    9137           0 :       __Pyx_XGOTREF(__pyx_t_11);
    9138           0 :       __Pyx_XGOTREF(__pyx_t_12);
    9139           0 :       __pyx_t_4 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_6 = __pyx_filename;
    9140             :       {
    9141           0 :         PyMem_Free(__pyx_v_tmp);
    9142             :       }
    9143           0 :       if (PY_MAJOR_VERSION >= 3) {
    9144           0 :         __Pyx_XGIVEREF(__pyx_t_10);
    9145           0 :         __Pyx_XGIVEREF(__pyx_t_11);
    9146           0 :         __Pyx_XGIVEREF(__pyx_t_12);
    9147           0 :         __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
    9148             :       }
    9149           0 :       __Pyx_XGIVEREF(__pyx_t_7);
    9150           0 :       __Pyx_XGIVEREF(__pyx_t_8);
    9151           0 :       __Pyx_XGIVEREF(__pyx_t_9);
    9152           0 :       __Pyx_ErrRestore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
    9153           0 :       __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
    9154           0 :       __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_6;
    9155           0 :       goto __pyx_L1_error;
    9156             :     }
    9157           0 :     __pyx_L7:;
    9158             :   }
    9159             : 
    9160             :   /* "View.MemoryView":453
    9161             :  *         memoryview_copy_contents(msrc, mdst, src.ndim, dst.ndim, self.dtype_is_object)
    9162             :  * 
    9163             :  *     cdef setitem_slice_assign_scalar(self, memoryview dst, value):             # <<<<<<<<<<<<<<
    9164             :  *         cdef int array[128]
    9165             :  *         cdef void *tmp = NULL
    9166             :  */
    9167             : 
    9168             :   /* function exit code */
    9169           0 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    9170           0 :   goto __pyx_L0;
    9171           0 :   __pyx_L1_error:;
    9172           0 :   __Pyx_XDECREF(__pyx_t_3);
    9173           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
    9174           0 :   __pyx_r = 0;
    9175           0 :   __pyx_L0:;
    9176           0 :   __Pyx_XGIVEREF(__pyx_r);
    9177           0 :   __Pyx_RefNannyFinishContext();
    9178           0 :   return __pyx_r;
    9179             : }
    9180             : 
    9181             : /* "View.MemoryView":485
    9182             :  *             PyMem_Free(tmp)
    9183             :  * 
    9184             :  *     cdef setitem_indexed(self, index, value):             # <<<<<<<<<<<<<<
    9185             :  *         cdef char *itemp = self.get_item_pointer(index)
    9186             :  *         self.assign_item_from_object(itemp, value)
    9187             :  */
    9188             : 
    9189           0 : static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
    9190           0 :   char *__pyx_v_itemp;
    9191           0 :   PyObject *__pyx_r = NULL;
    9192             :   __Pyx_RefNannyDeclarations
    9193           0 :   char *__pyx_t_1;
    9194           0 :   PyObject *__pyx_t_2 = NULL;
    9195           0 :   int __pyx_lineno = 0;
    9196           0 :   const char *__pyx_filename = NULL;
    9197           0 :   int __pyx_clineno = 0;
    9198           0 :   __Pyx_RefNannySetupContext("setitem_indexed", 1);
    9199             : 
    9200             :   /* "View.MemoryView":486
    9201             :  * 
    9202             :  *     cdef setitem_indexed(self, index, value):
    9203             :  *         cdef char *itemp = self.get_item_pointer(index)             # <<<<<<<<<<<<<<
    9204             :  *         self.assign_item_from_object(itemp, value)
    9205             :  * 
    9206             :  */
    9207           0 :   __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_index); if (unlikely(__pyx_t_1 == ((char *)NULL))) __PYX_ERR(1, 486, __pyx_L1_error)
    9208           0 :   __pyx_v_itemp = __pyx_t_1;
    9209             : 
    9210             :   /* "View.MemoryView":487
    9211             :  *     cdef setitem_indexed(self, index, value):
    9212             :  *         cdef char *itemp = self.get_item_pointer(index)
    9213             :  *         self.assign_item_from_object(itemp, value)             # <<<<<<<<<<<<<<
    9214             :  * 
    9215             :  *     cdef convert_item_to_object(self, char *itemp):
    9216             :  */
    9217           0 :   __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 487, __pyx_L1_error)
    9218           0 :   __Pyx_GOTREF(__pyx_t_2);
    9219           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    9220             : 
    9221             :   /* "View.MemoryView":485
    9222             :  *             PyMem_Free(tmp)
    9223             :  * 
    9224             :  *     cdef setitem_indexed(self, index, value):             # <<<<<<<<<<<<<<
    9225             :  *         cdef char *itemp = self.get_item_pointer(index)
    9226             :  *         self.assign_item_from_object(itemp, value)
    9227             :  */
    9228             : 
    9229             :   /* function exit code */
    9230           0 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    9231           0 :   goto __pyx_L0;
    9232           0 :   __pyx_L1_error:;
    9233           0 :   __Pyx_XDECREF(__pyx_t_2);
    9234           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_indexed", __pyx_clineno, __pyx_lineno, __pyx_filename);
    9235           0 :   __pyx_r = 0;
    9236           0 :   __pyx_L0:;
    9237           0 :   __Pyx_XGIVEREF(__pyx_r);
    9238           0 :   __Pyx_RefNannyFinishContext();
    9239           0 :   return __pyx_r;
    9240             : }
    9241             : 
    9242             : /* "View.MemoryView":489
    9243             :  *         self.assign_item_from_object(itemp, value)
    9244             :  * 
    9245             :  *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
    9246             :  *         """Only used if instantiated manually by the user, or if Cython doesn't
    9247             :  *         know how to convert the type"""
    9248             :  */
    9249             : 
    9250           0 : static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp) {
    9251           0 :   PyObject *__pyx_v_struct = NULL;
    9252           0 :   PyObject *__pyx_v_bytesitem = 0;
    9253           0 :   PyObject *__pyx_v_result = NULL;
    9254           0 :   PyObject *__pyx_r = NULL;
    9255             :   __Pyx_RefNannyDeclarations
    9256           0 :   PyObject *__pyx_t_1 = NULL;
    9257           0 :   PyObject *__pyx_t_2 = NULL;
    9258           0 :   PyObject *__pyx_t_3 = NULL;
    9259           0 :   PyObject *__pyx_t_4 = NULL;
    9260           0 :   PyObject *__pyx_t_5 = NULL;
    9261           0 :   PyObject *__pyx_t_6 = NULL;
    9262           0 :   PyObject *__pyx_t_7 = NULL;
    9263           0 :   unsigned int __pyx_t_8;
    9264           0 :   Py_ssize_t __pyx_t_9;
    9265           0 :   int __pyx_t_10;
    9266           0 :   int __pyx_t_11;
    9267           0 :   int __pyx_lineno = 0;
    9268           0 :   const char *__pyx_filename = NULL;
    9269           0 :   int __pyx_clineno = 0;
    9270           0 :   __Pyx_RefNannySetupContext("convert_item_to_object", 1);
    9271             : 
    9272             :   /* "View.MemoryView":492
    9273             :  *         """Only used if instantiated manually by the user, or if Cython doesn't
    9274             :  *         know how to convert the type"""
    9275             :  *         import struct             # <<<<<<<<<<<<<<
    9276             :  *         cdef bytes bytesitem
    9277             :  * 
    9278             :  */
    9279           0 :   __pyx_t_1 = __Pyx_ImportDottedModule(__pyx_n_s_struct, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 492, __pyx_L1_error)
    9280           0 :   __Pyx_GOTREF(__pyx_t_1);
    9281           0 :   __pyx_v_struct = __pyx_t_1;
    9282           0 :   __pyx_t_1 = 0;
    9283             : 
    9284             :   /* "View.MemoryView":495
    9285             :  *         cdef bytes bytesitem
    9286             :  * 
    9287             :  *         bytesitem = itemp[:self.view.itemsize]             # <<<<<<<<<<<<<<
    9288             :  *         try:
    9289             :  *             result = struct.unpack(self.view.format, bytesitem)
    9290             :  */
    9291           0 :   __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 495, __pyx_L1_error)
    9292           0 :   __Pyx_GOTREF(__pyx_t_1);
    9293           0 :   __pyx_v_bytesitem = ((PyObject*)__pyx_t_1);
    9294           0 :   __pyx_t_1 = 0;
    9295             : 
    9296             :   /* "View.MemoryView":496
    9297             :  * 
    9298             :  *         bytesitem = itemp[:self.view.itemsize]
    9299             :  *         try:             # <<<<<<<<<<<<<<
    9300             :  *             result = struct.unpack(self.view.format, bytesitem)
    9301             :  *         except struct.error:
    9302             :  */
    9303             :   {
    9304           0 :     __Pyx_PyThreadState_declare
    9305           0 :     __Pyx_PyThreadState_assign
    9306           0 :     __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
    9307           0 :     __Pyx_XGOTREF(__pyx_t_2);
    9308           0 :     __Pyx_XGOTREF(__pyx_t_3);
    9309           0 :     __Pyx_XGOTREF(__pyx_t_4);
    9310             :     /*try:*/ {
    9311             : 
    9312             :       /* "View.MemoryView":497
    9313             :  *         bytesitem = itemp[:self.view.itemsize]
    9314             :  *         try:
    9315             :  *             result = struct.unpack(self.view.format, bytesitem)             # <<<<<<<<<<<<<<
    9316             :  *         except struct.error:
    9317             :  *             raise ValueError, "Unable to convert item to object"
    9318             :  */
    9319           0 :       __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_unpack); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 497, __pyx_L3_error)
    9320           0 :       __Pyx_GOTREF(__pyx_t_5);
    9321           0 :       __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 497, __pyx_L3_error)
    9322           0 :       __Pyx_GOTREF(__pyx_t_6);
    9323           0 :       __pyx_t_7 = NULL;
    9324           0 :       __pyx_t_8 = 0;
    9325             :       #if CYTHON_UNPACK_METHODS
    9326           0 :       if (likely(PyMethod_Check(__pyx_t_5))) {
    9327           0 :         __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    9328           0 :         if (likely(__pyx_t_7)) {
    9329           0 :           PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
    9330           0 :           __Pyx_INCREF(__pyx_t_7);
    9331           0 :           __Pyx_INCREF(function);
    9332           0 :           __Pyx_DECREF_SET(__pyx_t_5, function);
    9333             :           __pyx_t_8 = 1;
    9334             :         }
    9335             :       }
    9336             :       #endif
    9337             :       {
    9338           0 :         PyObject *__pyx_callargs[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
    9339           0 :         __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_8, 2+__pyx_t_8);
    9340           0 :         __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    9341           0 :         __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    9342           0 :         if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 497, __pyx_L3_error)
    9343           0 :         __Pyx_GOTREF(__pyx_t_1);
    9344           0 :         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    9345             :       }
    9346           0 :       __pyx_v_result = __pyx_t_1;
    9347           0 :       __pyx_t_1 = 0;
    9348             : 
    9349             :       /* "View.MemoryView":496
    9350             :  * 
    9351             :  *         bytesitem = itemp[:self.view.itemsize]
    9352             :  *         try:             # <<<<<<<<<<<<<<
    9353             :  *             result = struct.unpack(self.view.format, bytesitem)
    9354             :  *         except struct.error:
    9355             :  */
    9356             :     }
    9357             : 
    9358             :     /* "View.MemoryView":501
    9359             :  *             raise ValueError, "Unable to convert item to object"
    9360             :  *         else:
    9361             :  *             if len(self.view.format) == 1:             # <<<<<<<<<<<<<<
    9362             :  *                 return result[0]
    9363             :  *             return result
    9364             :  */
    9365             :     /*else:*/ {
    9366           0 :       __pyx_t_9 = __Pyx_ssize_strlen(__pyx_v_self->view.format); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(1, 501, __pyx_L5_except_error)
    9367           0 :       __pyx_t_10 = (__pyx_t_9 == 1);
    9368           0 :       if (__pyx_t_10) {
    9369             : 
    9370             :         /* "View.MemoryView":502
    9371             :  *         else:
    9372             :  *             if len(self.view.format) == 1:
    9373             :  *                 return result[0]             # <<<<<<<<<<<<<<
    9374             :  *             return result
    9375             :  * 
    9376             :  */
    9377           0 :         __Pyx_XDECREF(__pyx_r);
    9378           0 :         __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 502, __pyx_L5_except_error)
    9379           0 :         __Pyx_GOTREF(__pyx_t_1);
    9380           0 :         __pyx_r = __pyx_t_1;
    9381           0 :         __pyx_t_1 = 0;
    9382           0 :         goto __pyx_L6_except_return;
    9383             : 
    9384             :         /* "View.MemoryView":501
    9385             :  *             raise ValueError, "Unable to convert item to object"
    9386             :  *         else:
    9387             :  *             if len(self.view.format) == 1:             # <<<<<<<<<<<<<<
    9388             :  *                 return result[0]
    9389             :  *             return result
    9390             :  */
    9391             :       }
    9392             : 
    9393             :       /* "View.MemoryView":503
    9394             :  *             if len(self.view.format) == 1:
    9395             :  *                 return result[0]
    9396             :  *             return result             # <<<<<<<<<<<<<<
    9397             :  * 
    9398             :  *     cdef assign_item_from_object(self, char *itemp, object value):
    9399             :  */
    9400           0 :       __Pyx_XDECREF(__pyx_r);
    9401           0 :       __Pyx_INCREF(__pyx_v_result);
    9402           0 :       __pyx_r = __pyx_v_result;
    9403           0 :       goto __pyx_L6_except_return;
    9404             :     }
    9405           0 :     __pyx_L3_error:;
    9406           0 :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    9407           0 :     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    9408           0 :     __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    9409           0 :     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    9410             : 
    9411             :     /* "View.MemoryView":498
    9412             :  *         try:
    9413             :  *             result = struct.unpack(self.view.format, bytesitem)
    9414             :  *         except struct.error:             # <<<<<<<<<<<<<<
    9415             :  *             raise ValueError, "Unable to convert item to object"
    9416             :  *         else:
    9417             :  */
    9418           0 :     __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_5, &__pyx_t_6);
    9419           0 :     __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 498, __pyx_L5_except_error)
    9420           0 :     __Pyx_GOTREF(__pyx_t_7);
    9421           0 :     __pyx_t_11 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_7);
    9422           0 :     __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    9423           0 :     __Pyx_ErrRestore(__pyx_t_1, __pyx_t_5, __pyx_t_6);
    9424           0 :     __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0;
    9425           0 :     if (__pyx_t_11) {
    9426           0 :       __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
    9427           0 :       if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(1, 498, __pyx_L5_except_error)
    9428           0 :       __Pyx_XGOTREF(__pyx_t_6);
    9429           0 :       __Pyx_XGOTREF(__pyx_t_5);
    9430           0 :       __Pyx_XGOTREF(__pyx_t_1);
    9431             : 
    9432             :       /* "View.MemoryView":499
    9433             :  *             result = struct.unpack(self.view.format, bytesitem)
    9434             :  *         except struct.error:
    9435             :  *             raise ValueError, "Unable to convert item to object"             # <<<<<<<<<<<<<<
    9436             :  *         else:
    9437             :  *             if len(self.view.format) == 1:
    9438             :  */
    9439           0 :       __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Unable_to_convert_item_to_object, 0, 0);
    9440           0 :       __PYX_ERR(1, 499, __pyx_L5_except_error)
    9441             :     }
    9442           0 :     goto __pyx_L5_except_error;
    9443             : 
    9444             :     /* "View.MemoryView":496
    9445             :  * 
    9446             :  *         bytesitem = itemp[:self.view.itemsize]
    9447             :  *         try:             # <<<<<<<<<<<<<<
    9448             :  *             result = struct.unpack(self.view.format, bytesitem)
    9449             :  *         except struct.error:
    9450             :  */
    9451           0 :     __pyx_L5_except_error:;
    9452           0 :     __Pyx_XGIVEREF(__pyx_t_2);
    9453           0 :     __Pyx_XGIVEREF(__pyx_t_3);
    9454           0 :     __Pyx_XGIVEREF(__pyx_t_4);
    9455           0 :     __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    9456           0 :     goto __pyx_L1_error;
    9457           0 :     __pyx_L6_except_return:;
    9458           0 :     __Pyx_XGIVEREF(__pyx_t_2);
    9459           0 :     __Pyx_XGIVEREF(__pyx_t_3);
    9460           0 :     __Pyx_XGIVEREF(__pyx_t_4);
    9461           0 :     __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
    9462           0 :     goto __pyx_L0;
    9463             :   }
    9464             : 
    9465             :   /* "View.MemoryView":489
    9466             :  *         self.assign_item_from_object(itemp, value)
    9467             :  * 
    9468             :  *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
    9469             :  *         """Only used if instantiated manually by the user, or if Cython doesn't
    9470             :  *         know how to convert the type"""
    9471             :  */
    9472             : 
    9473             :   /* function exit code */
    9474           0 :   __pyx_L1_error:;
    9475           0 :   __Pyx_XDECREF(__pyx_t_1);
    9476           0 :   __Pyx_XDECREF(__pyx_t_5);
    9477           0 :   __Pyx_XDECREF(__pyx_t_6);
    9478           0 :   __Pyx_XDECREF(__pyx_t_7);
    9479           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
    9480           0 :   __pyx_r = 0;
    9481           0 :   __pyx_L0:;
    9482           0 :   __Pyx_XDECREF(__pyx_v_struct);
    9483           0 :   __Pyx_XDECREF(__pyx_v_bytesitem);
    9484           0 :   __Pyx_XDECREF(__pyx_v_result);
    9485           0 :   __Pyx_XGIVEREF(__pyx_r);
    9486           0 :   __Pyx_RefNannyFinishContext();
    9487           0 :   return __pyx_r;
    9488             : }
    9489             : 
    9490             : /* "View.MemoryView":505
    9491             :  *             return result
    9492             :  * 
    9493             :  *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
    9494             :  *         """Only used if instantiated manually by the user, or if Cython doesn't
    9495             :  *         know how to convert the type"""
    9496             :  */
    9497             : 
    9498           0 : static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
    9499           0 :   PyObject *__pyx_v_struct = NULL;
    9500           0 :   char __pyx_v_c;
    9501           0 :   PyObject *__pyx_v_bytesvalue = 0;
    9502           0 :   Py_ssize_t __pyx_v_i;
    9503           0 :   PyObject *__pyx_r = NULL;
    9504             :   __Pyx_RefNannyDeclarations
    9505           0 :   PyObject *__pyx_t_1 = NULL;
    9506           0 :   int __pyx_t_2;
    9507           0 :   PyObject *__pyx_t_3 = NULL;
    9508           0 :   PyObject *__pyx_t_4 = NULL;
    9509           0 :   PyObject *__pyx_t_5 = NULL;
    9510           0 :   unsigned int __pyx_t_6;
    9511           0 :   Py_ssize_t __pyx_t_7;
    9512           0 :   PyObject *__pyx_t_8 = NULL;
    9513           0 :   char *__pyx_t_9;
    9514           0 :   char *__pyx_t_10;
    9515           0 :   char *__pyx_t_11;
    9516           0 :   char *__pyx_t_12;
    9517           0 :   int __pyx_lineno = 0;
    9518           0 :   const char *__pyx_filename = NULL;
    9519           0 :   int __pyx_clineno = 0;
    9520           0 :   __Pyx_RefNannySetupContext("assign_item_from_object", 1);
    9521             : 
    9522             :   /* "View.MemoryView":508
    9523             :  *         """Only used if instantiated manually by the user, or if Cython doesn't
    9524             :  *         know how to convert the type"""
    9525             :  *         import struct             # <<<<<<<<<<<<<<
    9526             :  *         cdef char c
    9527             :  *         cdef bytes bytesvalue
    9528             :  */
    9529           0 :   __pyx_t_1 = __Pyx_ImportDottedModule(__pyx_n_s_struct, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 508, __pyx_L1_error)
    9530           0 :   __Pyx_GOTREF(__pyx_t_1);
    9531           0 :   __pyx_v_struct = __pyx_t_1;
    9532           0 :   __pyx_t_1 = 0;
    9533             : 
    9534             :   /* "View.MemoryView":513
    9535             :  *         cdef Py_ssize_t i
    9536             :  * 
    9537             :  *         if isinstance(value, tuple):             # <<<<<<<<<<<<<<
    9538             :  *             bytesvalue = struct.pack(self.view.format, *value)
    9539             :  *         else:
    9540             :  */
    9541           0 :   __pyx_t_2 = PyTuple_Check(__pyx_v_value); 
    9542           0 :   if (__pyx_t_2) {
    9543             : 
    9544             :     /* "View.MemoryView":514
    9545             :  * 
    9546             :  *         if isinstance(value, tuple):
    9547             :  *             bytesvalue = struct.pack(self.view.format, *value)             # <<<<<<<<<<<<<<
    9548             :  *         else:
    9549             :  *             bytesvalue = struct.pack(self.view.format, value)
    9550             :  */
    9551           0 :     __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 514, __pyx_L1_error)
    9552           0 :     __Pyx_GOTREF(__pyx_t_1);
    9553           0 :     __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 514, __pyx_L1_error)
    9554           0 :     __Pyx_GOTREF(__pyx_t_3);
    9555           0 :     __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 514, __pyx_L1_error)
    9556           0 :     __Pyx_GOTREF(__pyx_t_4);
    9557           0 :     __Pyx_GIVEREF(__pyx_t_3);
    9558           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(1, 514, __pyx_L1_error);
    9559           0 :     __pyx_t_3 = 0;
    9560           0 :     __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 514, __pyx_L1_error)
    9561           0 :     __Pyx_GOTREF(__pyx_t_3);
    9562           0 :     __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 514, __pyx_L1_error)
    9563           0 :     __Pyx_GOTREF(__pyx_t_5);
    9564           0 :     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    9565           0 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    9566           0 :     __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 514, __pyx_L1_error)
    9567           0 :     __Pyx_GOTREF(__pyx_t_3);
    9568           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    9569           0 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    9570           0 :     if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_3))) __PYX_ERR(1, 514, __pyx_L1_error)
    9571           0 :     __pyx_v_bytesvalue = ((PyObject*)__pyx_t_3);
    9572           0 :     __pyx_t_3 = 0;
    9573             : 
    9574             :     /* "View.MemoryView":513
    9575             :  *         cdef Py_ssize_t i
    9576             :  * 
    9577             :  *         if isinstance(value, tuple):             # <<<<<<<<<<<<<<
    9578             :  *             bytesvalue = struct.pack(self.view.format, *value)
    9579             :  *         else:
    9580             :  */
    9581           0 :     goto __pyx_L3;
    9582             :   }
    9583             : 
    9584             :   /* "View.MemoryView":516
    9585             :  *             bytesvalue = struct.pack(self.view.format, *value)
    9586             :  *         else:
    9587             :  *             bytesvalue = struct.pack(self.view.format, value)             # <<<<<<<<<<<<<<
    9588             :  * 
    9589             :  *         for i, c in enumerate(bytesvalue):
    9590             :  */
    9591             :   /*else*/ {
    9592           0 :     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 516, __pyx_L1_error)
    9593           0 :     __Pyx_GOTREF(__pyx_t_5);
    9594           0 :     __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 516, __pyx_L1_error)
    9595           0 :     __Pyx_GOTREF(__pyx_t_1);
    9596           0 :     __pyx_t_4 = NULL;
    9597           0 :     __pyx_t_6 = 0;
    9598             :     #if CYTHON_UNPACK_METHODS
    9599           0 :     if (likely(PyMethod_Check(__pyx_t_5))) {
    9600           0 :       __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    9601           0 :       if (likely(__pyx_t_4)) {
    9602           0 :         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
    9603           0 :         __Pyx_INCREF(__pyx_t_4);
    9604           0 :         __Pyx_INCREF(function);
    9605           0 :         __Pyx_DECREF_SET(__pyx_t_5, function);
    9606             :         __pyx_t_6 = 1;
    9607             :       }
    9608             :     }
    9609             :     #endif
    9610             :     {
    9611           0 :       PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_1, __pyx_v_value};
    9612           0 :       __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 2+__pyx_t_6);
    9613           0 :       __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    9614           0 :       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    9615           0 :       if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 516, __pyx_L1_error)
    9616           0 :       __Pyx_GOTREF(__pyx_t_3);
    9617           0 :       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    9618             :     }
    9619           0 :     if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_3))) __PYX_ERR(1, 516, __pyx_L1_error)
    9620             :     __pyx_v_bytesvalue = ((PyObject*)__pyx_t_3);
    9621             :     __pyx_t_3 = 0;
    9622             :   }
    9623           0 :   __pyx_L3:;
    9624             : 
    9625             :   /* "View.MemoryView":518
    9626             :  *             bytesvalue = struct.pack(self.view.format, value)
    9627             :  * 
    9628             :  *         for i, c in enumerate(bytesvalue):             # <<<<<<<<<<<<<<
    9629             :  *             itemp[i] = c
    9630             :  * 
    9631             :  */
    9632           0 :   __pyx_t_7 = 0;
    9633           0 :   if (unlikely(__pyx_v_bytesvalue == Py_None)) {
    9634           0 :     PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable");
    9635           0 :     __PYX_ERR(1, 518, __pyx_L1_error)
    9636             :   }
    9637           0 :   __Pyx_INCREF(__pyx_v_bytesvalue);
    9638           0 :   __pyx_t_8 = __pyx_v_bytesvalue;
    9639           0 :   __pyx_t_10 = PyBytes_AS_STRING(__pyx_t_8);
    9640           0 :   __pyx_t_11 = (__pyx_t_10 + PyBytes_GET_SIZE(__pyx_t_8));
    9641           0 :   for (__pyx_t_12 = __pyx_t_10; __pyx_t_12 < __pyx_t_11; __pyx_t_12++) {
    9642           0 :     __pyx_t_9 = __pyx_t_12;
    9643           0 :     __pyx_v_c = (__pyx_t_9[0]);
    9644             : 
    9645             :     /* "View.MemoryView":519
    9646             :  * 
    9647             :  *         for i, c in enumerate(bytesvalue):
    9648             :  *             itemp[i] = c             # <<<<<<<<<<<<<<
    9649             :  * 
    9650             :  *     @cname('getbuffer')
    9651             :  */
    9652           0 :     __pyx_v_i = __pyx_t_7;
    9653             : 
    9654             :     /* "View.MemoryView":518
    9655             :  *             bytesvalue = struct.pack(self.view.format, value)
    9656             :  * 
    9657             :  *         for i, c in enumerate(bytesvalue):             # <<<<<<<<<<<<<<
    9658             :  *             itemp[i] = c
    9659             :  * 
    9660             :  */
    9661           0 :     __pyx_t_7 = (__pyx_t_7 + 1);
    9662             : 
    9663             :     /* "View.MemoryView":519
    9664             :  * 
    9665             :  *         for i, c in enumerate(bytesvalue):
    9666             :  *             itemp[i] = c             # <<<<<<<<<<<<<<
    9667             :  * 
    9668             :  *     @cname('getbuffer')
    9669             :  */
    9670           0 :     (__pyx_v_itemp[__pyx_v_i]) = __pyx_v_c;
    9671             :   }
    9672           0 :   __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    9673             : 
    9674             :   /* "View.MemoryView":505
    9675             :  *             return result
    9676             :  * 
    9677             :  *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
    9678             :  *         """Only used if instantiated manually by the user, or if Cython doesn't
    9679             :  *         know how to convert the type"""
    9680             :  */
    9681             : 
    9682             :   /* function exit code */
    9683           0 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    9684           0 :   goto __pyx_L0;
    9685           0 :   __pyx_L1_error:;
    9686           0 :   __Pyx_XDECREF(__pyx_t_1);
    9687           0 :   __Pyx_XDECREF(__pyx_t_3);
    9688           0 :   __Pyx_XDECREF(__pyx_t_4);
    9689           0 :   __Pyx_XDECREF(__pyx_t_5);
    9690           0 :   __Pyx_XDECREF(__pyx_t_8);
    9691           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
    9692           0 :   __pyx_r = 0;
    9693           0 :   __pyx_L0:;
    9694           0 :   __Pyx_XDECREF(__pyx_v_struct);
    9695           0 :   __Pyx_XDECREF(__pyx_v_bytesvalue);
    9696           0 :   __Pyx_XGIVEREF(__pyx_r);
    9697           0 :   __Pyx_RefNannyFinishContext();
    9698           0 :   return __pyx_r;
    9699             : }
    9700             : 
    9701             : /* "View.MemoryView":521
    9702             :  *             itemp[i] = c
    9703             :  * 
    9704             :  *     @cname('getbuffer')             # <<<<<<<<<<<<<<
    9705             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
    9706             :  *         if flags & PyBUF_WRITABLE and self.view.readonly:
    9707             :  */
    9708             : 
    9709             : /* Python wrapper */
    9710             : CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
    9711           0 : CYTHON_UNUSED static int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
    9712           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
    9713           0 :   int __pyx_r;
    9714             :   __Pyx_RefNannyDeclarations
    9715           0 :   __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
    9716           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
    9717           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
    9718             : 
    9719             :   /* function exit code */
    9720           0 :   __Pyx_RefNannyFinishContext();
    9721           0 :   return __pyx_r;
    9722             : }
    9723             : 
    9724           0 : static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
    9725           0 :   int __pyx_r;
    9726             :   __Pyx_RefNannyDeclarations
    9727           0 :   int __pyx_t_1;
    9728           0 :   int __pyx_t_2;
    9729           0 :   Py_ssize_t *__pyx_t_3;
    9730           0 :   char *__pyx_t_4;
    9731           0 :   void *__pyx_t_5;
    9732           0 :   int __pyx_t_6;
    9733           0 :   Py_ssize_t __pyx_t_7;
    9734           0 :   int __pyx_lineno = 0;
    9735           0 :   const char *__pyx_filename = NULL;
    9736           0 :   int __pyx_clineno = 0;
    9737           0 :   if (unlikely(__pyx_v_info == NULL)) {
    9738           0 :     PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
    9739           0 :     return -1;
    9740             :   }
    9741           0 :   __Pyx_RefNannySetupContext("__getbuffer__", 0);
    9742           0 :   __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
    9743           0 :   __Pyx_GIVEREF(__pyx_v_info->obj);
    9744             : 
    9745             :   /* "View.MemoryView":523
    9746             :  *     @cname('getbuffer')
    9747             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
    9748             :  *         if flags & PyBUF_WRITABLE and self.view.readonly:             # <<<<<<<<<<<<<<
    9749             :  *             raise ValueError, "Cannot create writable memory view from read-only memoryview"
    9750             :  * 
    9751             :  */
    9752           0 :   __pyx_t_2 = ((__pyx_v_flags & PyBUF_WRITABLE) != 0);
    9753           0 :   if (__pyx_t_2) {
    9754           0 :   } else {
    9755           0 :     __pyx_t_1 = __pyx_t_2;
    9756           0 :     goto __pyx_L4_bool_binop_done;
    9757             :   }
    9758           0 :   __pyx_t_1 = __pyx_v_self->view.readonly;
    9759           0 :   __pyx_L4_bool_binop_done:;
    9760           0 :   if (unlikely(__pyx_t_1)) {
    9761             : 
    9762             :     /* "View.MemoryView":524
    9763             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
    9764             :  *         if flags & PyBUF_WRITABLE and self.view.readonly:
    9765             :  *             raise ValueError, "Cannot create writable memory view from read-only memoryview"             # <<<<<<<<<<<<<<
    9766             :  * 
    9767             :  *         if flags & PyBUF_ND:
    9768             :  */
    9769           0 :     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Cannot_create_writable_memory_vi, 0, 0);
    9770           0 :     __PYX_ERR(1, 524, __pyx_L1_error)
    9771             : 
    9772             :     /* "View.MemoryView":523
    9773             :  *     @cname('getbuffer')
    9774             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
    9775             :  *         if flags & PyBUF_WRITABLE and self.view.readonly:             # <<<<<<<<<<<<<<
    9776             :  *             raise ValueError, "Cannot create writable memory view from read-only memoryview"
    9777             :  * 
    9778             :  */
    9779             :   }
    9780             : 
    9781             :   /* "View.MemoryView":526
    9782             :  *             raise ValueError, "Cannot create writable memory view from read-only memoryview"
    9783             :  * 
    9784             :  *         if flags & PyBUF_ND:             # <<<<<<<<<<<<<<
    9785             :  *             info.shape = self.view.shape
    9786             :  *         else:
    9787             :  */
    9788           0 :   __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
    9789           0 :   if (__pyx_t_1) {
    9790             : 
    9791             :     /* "View.MemoryView":527
    9792             :  * 
    9793             :  *         if flags & PyBUF_ND:
    9794             :  *             info.shape = self.view.shape             # <<<<<<<<<<<<<<
    9795             :  *         else:
    9796             :  *             info.shape = NULL
    9797             :  */
    9798           0 :     __pyx_t_3 = __pyx_v_self->view.shape;
    9799           0 :     __pyx_v_info->shape = __pyx_t_3;
    9800             : 
    9801             :     /* "View.MemoryView":526
    9802             :  *             raise ValueError, "Cannot create writable memory view from read-only memoryview"
    9803             :  * 
    9804             :  *         if flags & PyBUF_ND:             # <<<<<<<<<<<<<<
    9805             :  *             info.shape = self.view.shape
    9806             :  *         else:
    9807             :  */
    9808           0 :     goto __pyx_L6;
    9809             :   }
    9810             : 
    9811             :   /* "View.MemoryView":529
    9812             :  *             info.shape = self.view.shape
    9813             :  *         else:
    9814             :  *             info.shape = NULL             # <<<<<<<<<<<<<<
    9815             :  * 
    9816             :  *         if flags & PyBUF_STRIDES:
    9817             :  */
    9818             :   /*else*/ {
    9819           0 :     __pyx_v_info->shape = NULL;
    9820             :   }
    9821           0 :   __pyx_L6:;
    9822             : 
    9823             :   /* "View.MemoryView":531
    9824             :  *             info.shape = NULL
    9825             :  * 
    9826             :  *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
    9827             :  *             info.strides = self.view.strides
    9828             :  *         else:
    9829             :  */
    9830           0 :   __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
    9831           0 :   if (__pyx_t_1) {
    9832             : 
    9833             :     /* "View.MemoryView":532
    9834             :  * 
    9835             :  *         if flags & PyBUF_STRIDES:
    9836             :  *             info.strides = self.view.strides             # <<<<<<<<<<<<<<
    9837             :  *         else:
    9838             :  *             info.strides = NULL
    9839             :  */
    9840           0 :     __pyx_t_3 = __pyx_v_self->view.strides;
    9841           0 :     __pyx_v_info->strides = __pyx_t_3;
    9842             : 
    9843             :     /* "View.MemoryView":531
    9844             :  *             info.shape = NULL
    9845             :  * 
    9846             :  *         if flags & PyBUF_STRIDES:             # <<<<<<<<<<<<<<
    9847             :  *             info.strides = self.view.strides
    9848             :  *         else:
    9849             :  */
    9850           0 :     goto __pyx_L7;
    9851             :   }
    9852             : 
    9853             :   /* "View.MemoryView":534
    9854             :  *             info.strides = self.view.strides
    9855             :  *         else:
    9856             :  *             info.strides = NULL             # <<<<<<<<<<<<<<
    9857             :  * 
    9858             :  *         if flags & PyBUF_INDIRECT:
    9859             :  */
    9860             :   /*else*/ {
    9861           0 :     __pyx_v_info->strides = NULL;
    9862             :   }
    9863           0 :   __pyx_L7:;
    9864             : 
    9865             :   /* "View.MemoryView":536
    9866             :  *             info.strides = NULL
    9867             :  * 
    9868             :  *         if flags & PyBUF_INDIRECT:             # <<<<<<<<<<<<<<
    9869             :  *             info.suboffsets = self.view.suboffsets
    9870             :  *         else:
    9871             :  */
    9872           0 :   __pyx_t_1 = ((__pyx_v_flags & PyBUF_INDIRECT) != 0);
    9873           0 :   if (__pyx_t_1) {
    9874             : 
    9875             :     /* "View.MemoryView":537
    9876             :  * 
    9877             :  *         if flags & PyBUF_INDIRECT:
    9878             :  *             info.suboffsets = self.view.suboffsets             # <<<<<<<<<<<<<<
    9879             :  *         else:
    9880             :  *             info.suboffsets = NULL
    9881             :  */
    9882           0 :     __pyx_t_3 = __pyx_v_self->view.suboffsets;
    9883           0 :     __pyx_v_info->suboffsets = __pyx_t_3;
    9884             : 
    9885             :     /* "View.MemoryView":536
    9886             :  *             info.strides = NULL
    9887             :  * 
    9888             :  *         if flags & PyBUF_INDIRECT:             # <<<<<<<<<<<<<<
    9889             :  *             info.suboffsets = self.view.suboffsets
    9890             :  *         else:
    9891             :  */
    9892           0 :     goto __pyx_L8;
    9893             :   }
    9894             : 
    9895             :   /* "View.MemoryView":539
    9896             :  *             info.suboffsets = self.view.suboffsets
    9897             :  *         else:
    9898             :  *             info.suboffsets = NULL             # <<<<<<<<<<<<<<
    9899             :  * 
    9900             :  *         if flags & PyBUF_FORMAT:
    9901             :  */
    9902             :   /*else*/ {
    9903           0 :     __pyx_v_info->suboffsets = NULL;
    9904             :   }
    9905           0 :   __pyx_L8:;
    9906             : 
    9907             :   /* "View.MemoryView":541
    9908             :  *             info.suboffsets = NULL
    9909             :  * 
    9910             :  *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
    9911             :  *             info.format = self.view.format
    9912             :  *         else:
    9913             :  */
    9914           0 :   __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
    9915           0 :   if (__pyx_t_1) {
    9916             : 
    9917             :     /* "View.MemoryView":542
    9918             :  * 
    9919             :  *         if flags & PyBUF_FORMAT:
    9920             :  *             info.format = self.view.format             # <<<<<<<<<<<<<<
    9921             :  *         else:
    9922             :  *             info.format = NULL
    9923             :  */
    9924           0 :     __pyx_t_4 = __pyx_v_self->view.format;
    9925           0 :     __pyx_v_info->format = __pyx_t_4;
    9926             : 
    9927             :     /* "View.MemoryView":541
    9928             :  *             info.suboffsets = NULL
    9929             :  * 
    9930             :  *         if flags & PyBUF_FORMAT:             # <<<<<<<<<<<<<<
    9931             :  *             info.format = self.view.format
    9932             :  *         else:
    9933             :  */
    9934           0 :     goto __pyx_L9;
    9935             :   }
    9936             : 
    9937             :   /* "View.MemoryView":544
    9938             :  *             info.format = self.view.format
    9939             :  *         else:
    9940             :  *             info.format = NULL             # <<<<<<<<<<<<<<
    9941             :  * 
    9942             :  *         info.buf = self.view.buf
    9943             :  */
    9944             :   /*else*/ {
    9945           0 :     __pyx_v_info->format = NULL;
    9946             :   }
    9947           0 :   __pyx_L9:;
    9948             : 
    9949             :   /* "View.MemoryView":546
    9950             :  *             info.format = NULL
    9951             :  * 
    9952             :  *         info.buf = self.view.buf             # <<<<<<<<<<<<<<
    9953             :  *         info.ndim = self.view.ndim
    9954             :  *         info.itemsize = self.view.itemsize
    9955             :  */
    9956           0 :   __pyx_t_5 = __pyx_v_self->view.buf;
    9957           0 :   __pyx_v_info->buf = __pyx_t_5;
    9958             : 
    9959             :   /* "View.MemoryView":547
    9960             :  * 
    9961             :  *         info.buf = self.view.buf
    9962             :  *         info.ndim = self.view.ndim             # <<<<<<<<<<<<<<
    9963             :  *         info.itemsize = self.view.itemsize
    9964             :  *         info.len = self.view.len
    9965             :  */
    9966           0 :   __pyx_t_6 = __pyx_v_self->view.ndim;
    9967           0 :   __pyx_v_info->ndim = __pyx_t_6;
    9968             : 
    9969             :   /* "View.MemoryView":548
    9970             :  *         info.buf = self.view.buf
    9971             :  *         info.ndim = self.view.ndim
    9972             :  *         info.itemsize = self.view.itemsize             # <<<<<<<<<<<<<<
    9973             :  *         info.len = self.view.len
    9974             :  *         info.readonly = self.view.readonly
    9975             :  */
    9976           0 :   __pyx_t_7 = __pyx_v_self->view.itemsize;
    9977           0 :   __pyx_v_info->itemsize = __pyx_t_7;
    9978             : 
    9979             :   /* "View.MemoryView":549
    9980             :  *         info.ndim = self.view.ndim
    9981             :  *         info.itemsize = self.view.itemsize
    9982             :  *         info.len = self.view.len             # <<<<<<<<<<<<<<
    9983             :  *         info.readonly = self.view.readonly
    9984             :  *         info.obj = self
    9985             :  */
    9986           0 :   __pyx_t_7 = __pyx_v_self->view.len;
    9987           0 :   __pyx_v_info->len = __pyx_t_7;
    9988             : 
    9989             :   /* "View.MemoryView":550
    9990             :  *         info.itemsize = self.view.itemsize
    9991             :  *         info.len = self.view.len
    9992             :  *         info.readonly = self.view.readonly             # <<<<<<<<<<<<<<
    9993             :  *         info.obj = self
    9994             :  * 
    9995             :  */
    9996           0 :   __pyx_t_1 = __pyx_v_self->view.readonly;
    9997           0 :   __pyx_v_info->readonly = __pyx_t_1;
    9998             : 
    9999             :   /* "View.MemoryView":551
   10000             :  *         info.len = self.view.len
   10001             :  *         info.readonly = self.view.readonly
   10002             :  *         info.obj = self             # <<<<<<<<<<<<<<
   10003             :  * 
   10004             :  * 
   10005             :  */
   10006           0 :   __Pyx_INCREF((PyObject *)__pyx_v_self);
   10007           0 :   __Pyx_GIVEREF((PyObject *)__pyx_v_self);
   10008           0 :   __Pyx_GOTREF(__pyx_v_info->obj);
   10009           0 :   __Pyx_DECREF(__pyx_v_info->obj);
   10010           0 :   __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
   10011             : 
   10012             :   /* "View.MemoryView":521
   10013             :  *             itemp[i] = c
   10014             :  * 
   10015             :  *     @cname('getbuffer')             # <<<<<<<<<<<<<<
   10016             :  *     def __getbuffer__(self, Py_buffer *info, int flags):
   10017             :  *         if flags & PyBUF_WRITABLE and self.view.readonly:
   10018             :  */
   10019             : 
   10020             :   /* function exit code */
   10021           0 :   __pyx_r = 0;
   10022           0 :   goto __pyx_L0;
   10023           0 :   __pyx_L1_error:;
   10024           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10025           0 :   __pyx_r = -1;
   10026           0 :   if (__pyx_v_info->obj != NULL) {
   10027           0 :     __Pyx_GOTREF(__pyx_v_info->obj);
   10028           0 :     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
   10029             :   }
   10030           0 :   goto __pyx_L2;
   10031           0 :   __pyx_L0:;
   10032           0 :   if (__pyx_v_info->obj == Py_None) {
   10033           0 :     __Pyx_GOTREF(__pyx_v_info->obj);
   10034           0 :     __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
   10035             :   }
   10036           0 :   __pyx_L2:;
   10037             :   __Pyx_RefNannyFinishContext();
   10038             :   return __pyx_r;
   10039             : }
   10040             : 
   10041             : /* "View.MemoryView":554
   10042             :  * 
   10043             :  * 
   10044             :  *     @property             # <<<<<<<<<<<<<<
   10045             :  *     def T(self):
   10046             :  *         cdef _memoryviewslice result = memoryview_copy(self)
   10047             :  */
   10048             : 
   10049             : /* Python wrapper */
   10050             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self); /*proto*/
   10051           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self) {
   10052           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10053           0 :   PyObject *__pyx_r = 0;
   10054             :   __Pyx_RefNannyDeclarations
   10055           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   10056           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10057           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   10058             : 
   10059             :   /* function exit code */
   10060           0 :   __Pyx_RefNannyFinishContext();
   10061           0 :   return __pyx_r;
   10062             : }
   10063             : 
   10064           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   10065           0 :   struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
   10066           0 :   PyObject *__pyx_r = NULL;
   10067             :   __Pyx_RefNannyDeclarations
   10068           0 :   PyObject *__pyx_t_1 = NULL;
   10069           0 :   int __pyx_t_2;
   10070           0 :   int __pyx_lineno = 0;
   10071           0 :   const char *__pyx_filename = NULL;
   10072           0 :   int __pyx_clineno = 0;
   10073           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   10074             : 
   10075             :   /* "View.MemoryView":556
   10076             :  *     @property
   10077             :  *     def T(self):
   10078             :  *         cdef _memoryviewslice result = memoryview_copy(self)             # <<<<<<<<<<<<<<
   10079             :  *         transpose_memslice(&result.from_slice)
   10080             :  *         return result
   10081             :  */
   10082           0 :   __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 556, __pyx_L1_error)
   10083           0 :   __Pyx_GOTREF(__pyx_t_1);
   10084           0 :   if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_memoryviewslice_type))))) __PYX_ERR(1, 556, __pyx_L1_error)
   10085           0 :   __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_1);
   10086           0 :   __pyx_t_1 = 0;
   10087             : 
   10088             :   /* "View.MemoryView":557
   10089             :  *     def T(self):
   10090             :  *         cdef _memoryviewslice result = memoryview_copy(self)
   10091             :  *         transpose_memslice(&result.from_slice)             # <<<<<<<<<<<<<<
   10092             :  *         return result
   10093             :  * 
   10094             :  */
   10095           0 :   __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 557, __pyx_L1_error)
   10096             : 
   10097             :   /* "View.MemoryView":558
   10098             :  *         cdef _memoryviewslice result = memoryview_copy(self)
   10099             :  *         transpose_memslice(&result.from_slice)
   10100             :  *         return result             # <<<<<<<<<<<<<<
   10101             :  * 
   10102             :  *     @property
   10103             :  */
   10104           0 :   __Pyx_XDECREF(__pyx_r);
   10105           0 :   __Pyx_INCREF((PyObject *)__pyx_v_result);
   10106           0 :   __pyx_r = ((PyObject *)__pyx_v_result);
   10107           0 :   goto __pyx_L0;
   10108             : 
   10109             :   /* "View.MemoryView":554
   10110             :  * 
   10111             :  * 
   10112             :  *     @property             # <<<<<<<<<<<<<<
   10113             :  *     def T(self):
   10114             :  *         cdef _memoryviewslice result = memoryview_copy(self)
   10115             :  */
   10116             : 
   10117             :   /* function exit code */
   10118           0 :   __pyx_L1_error:;
   10119           0 :   __Pyx_XDECREF(__pyx_t_1);
   10120           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.T.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10121           0 :   __pyx_r = NULL;
   10122           0 :   __pyx_L0:;
   10123           0 :   __Pyx_XDECREF((PyObject *)__pyx_v_result);
   10124           0 :   __Pyx_XGIVEREF(__pyx_r);
   10125           0 :   __Pyx_RefNannyFinishContext();
   10126           0 :   return __pyx_r;
   10127             : }
   10128             : 
   10129             : /* "View.MemoryView":560
   10130             :  *         return result
   10131             :  * 
   10132             :  *     @property             # <<<<<<<<<<<<<<
   10133             :  *     def base(self):
   10134             :  *         return self._get_base()
   10135             :  */
   10136             : 
   10137             : /* Python wrapper */
   10138             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
   10139           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self) {
   10140           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10141           0 :   PyObject *__pyx_r = 0;
   10142             :   __Pyx_RefNannyDeclarations
   10143           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   10144           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10145           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   10146             : 
   10147             :   /* function exit code */
   10148           0 :   __Pyx_RefNannyFinishContext();
   10149           0 :   return __pyx_r;
   10150             : }
   10151             : 
   10152           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   10153           0 :   PyObject *__pyx_r = NULL;
   10154             :   __Pyx_RefNannyDeclarations
   10155           0 :   PyObject *__pyx_t_1 = NULL;
   10156           0 :   int __pyx_lineno = 0;
   10157           0 :   const char *__pyx_filename = NULL;
   10158           0 :   int __pyx_clineno = 0;
   10159           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   10160             : 
   10161             :   /* "View.MemoryView":562
   10162             :  *     @property
   10163             :  *     def base(self):
   10164             :  *         return self._get_base()             # <<<<<<<<<<<<<<
   10165             :  * 
   10166             :  *     cdef _get_base(self):
   10167             :  */
   10168           0 :   __Pyx_XDECREF(__pyx_r);
   10169           0 :   __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->_get_base(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 562, __pyx_L1_error)
   10170           0 :   __Pyx_GOTREF(__pyx_t_1);
   10171           0 :   __pyx_r = __pyx_t_1;
   10172           0 :   __pyx_t_1 = 0;
   10173           0 :   goto __pyx_L0;
   10174             : 
   10175             :   /* "View.MemoryView":560
   10176             :  *         return result
   10177             :  * 
   10178             :  *     @property             # <<<<<<<<<<<<<<
   10179             :  *     def base(self):
   10180             :  *         return self._get_base()
   10181             :  */
   10182             : 
   10183             :   /* function exit code */
   10184           0 :   __pyx_L1_error:;
   10185           0 :   __Pyx_XDECREF(__pyx_t_1);
   10186           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.base.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10187           0 :   __pyx_r = NULL;
   10188           0 :   __pyx_L0:;
   10189           0 :   __Pyx_XGIVEREF(__pyx_r);
   10190           0 :   __Pyx_RefNannyFinishContext();
   10191           0 :   return __pyx_r;
   10192             : }
   10193             : 
   10194             : /* "View.MemoryView":564
   10195             :  *         return self._get_base()
   10196             :  * 
   10197             :  *     cdef _get_base(self):             # <<<<<<<<<<<<<<
   10198             :  *         return self.obj
   10199             :  * 
   10200             :  */
   10201             : 
   10202           0 : static PyObject *__pyx_memoryview__get_base(struct __pyx_memoryview_obj *__pyx_v_self) {
   10203           0 :   PyObject *__pyx_r = NULL;
   10204             :   __Pyx_RefNannyDeclarations
   10205           0 :   __Pyx_RefNannySetupContext("_get_base", 1);
   10206             : 
   10207             :   /* "View.MemoryView":565
   10208             :  * 
   10209             :  *     cdef _get_base(self):
   10210             :  *         return self.obj             # <<<<<<<<<<<<<<
   10211             :  * 
   10212             :  *     @property
   10213             :  */
   10214           0 :   __Pyx_XDECREF(__pyx_r);
   10215           0 :   __Pyx_INCREF(__pyx_v_self->obj);
   10216           0 :   __pyx_r = __pyx_v_self->obj;
   10217           0 :   goto __pyx_L0;
   10218             : 
   10219             :   /* "View.MemoryView":564
   10220             :  *         return self._get_base()
   10221             :  * 
   10222             :  *     cdef _get_base(self):             # <<<<<<<<<<<<<<
   10223             :  *         return self.obj
   10224             :  * 
   10225             :  */
   10226             : 
   10227             :   /* function exit code */
   10228           0 :   __pyx_L0:;
   10229           0 :   __Pyx_XGIVEREF(__pyx_r);
   10230           0 :   __Pyx_RefNannyFinishContext();
   10231           0 :   return __pyx_r;
   10232             : }
   10233             : 
   10234             : /* "View.MemoryView":567
   10235             :  *         return self.obj
   10236             :  * 
   10237             :  *     @property             # <<<<<<<<<<<<<<
   10238             :  *     def shape(self):
   10239             :  *         return tuple([length for length in self.view.shape[:self.view.ndim]])
   10240             :  */
   10241             : 
   10242             : /* Python wrapper */
   10243             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/
   10244           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self) {
   10245           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10246           0 :   PyObject *__pyx_r = 0;
   10247             :   __Pyx_RefNannyDeclarations
   10248           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   10249           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10250           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   10251             : 
   10252             :   /* function exit code */
   10253           0 :   __Pyx_RefNannyFinishContext();
   10254           0 :   return __pyx_r;
   10255             : }
   10256             : 
   10257           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   10258           0 :   Py_ssize_t __pyx_7genexpr__pyx_v_length;
   10259           0 :   PyObject *__pyx_r = NULL;
   10260             :   __Pyx_RefNannyDeclarations
   10261           0 :   PyObject *__pyx_t_1 = NULL;
   10262           0 :   Py_ssize_t *__pyx_t_2;
   10263           0 :   Py_ssize_t *__pyx_t_3;
   10264           0 :   Py_ssize_t *__pyx_t_4;
   10265           0 :   PyObject *__pyx_t_5 = NULL;
   10266           0 :   int __pyx_lineno = 0;
   10267           0 :   const char *__pyx_filename = NULL;
   10268           0 :   int __pyx_clineno = 0;
   10269           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   10270             : 
   10271             :   /* "View.MemoryView":569
   10272             :  *     @property
   10273             :  *     def shape(self):
   10274             :  *         return tuple([length for length in self.view.shape[:self.view.ndim]])             # <<<<<<<<<<<<<<
   10275             :  * 
   10276             :  *     @property
   10277             :  */
   10278           0 :   __Pyx_XDECREF(__pyx_r);
   10279             :   { /* enter inner scope */
   10280           0 :     __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 569, __pyx_L1_error)
   10281           0 :     __Pyx_GOTREF(__pyx_t_1);
   10282           0 :     __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
   10283           0 :     for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
   10284           0 :       __pyx_t_2 = __pyx_t_4;
   10285           0 :       __pyx_7genexpr__pyx_v_length = (__pyx_t_2[0]);
   10286           0 :       __pyx_t_5 = PyInt_FromSsize_t(__pyx_7genexpr__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 569, __pyx_L1_error)
   10287           0 :       __Pyx_GOTREF(__pyx_t_5);
   10288           0 :       if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 569, __pyx_L1_error)
   10289           0 :       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   10290             :     }
   10291             :   } /* exit inner scope */
   10292           0 :   __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 569, __pyx_L1_error)
   10293           0 :   __Pyx_GOTREF(__pyx_t_5);
   10294           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   10295           0 :   __pyx_r = __pyx_t_5;
   10296           0 :   __pyx_t_5 = 0;
   10297           0 :   goto __pyx_L0;
   10298             : 
   10299             :   /* "View.MemoryView":567
   10300             :  *         return self.obj
   10301             :  * 
   10302             :  *     @property             # <<<<<<<<<<<<<<
   10303             :  *     def shape(self):
   10304             :  *         return tuple([length for length in self.view.shape[:self.view.ndim]])
   10305             :  */
   10306             : 
   10307             :   /* function exit code */
   10308           0 :   __pyx_L1_error:;
   10309           0 :   __Pyx_XDECREF(__pyx_t_1);
   10310           0 :   __Pyx_XDECREF(__pyx_t_5);
   10311           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10312           0 :   __pyx_r = NULL;
   10313           0 :   __pyx_L0:;
   10314           0 :   __Pyx_XGIVEREF(__pyx_r);
   10315           0 :   __Pyx_RefNannyFinishContext();
   10316           0 :   return __pyx_r;
   10317             : }
   10318             : 
   10319             : /* "View.MemoryView":571
   10320             :  *         return tuple([length for length in self.view.shape[:self.view.ndim]])
   10321             :  * 
   10322             :  *     @property             # <<<<<<<<<<<<<<
   10323             :  *     def strides(self):
   10324             :  *         if self.view.strides == NULL:
   10325             :  */
   10326             : 
   10327             : /* Python wrapper */
   10328             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self); /*proto*/
   10329           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self) {
   10330           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10331           0 :   PyObject *__pyx_r = 0;
   10332             :   __Pyx_RefNannyDeclarations
   10333           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   10334           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10335           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   10336             : 
   10337             :   /* function exit code */
   10338           0 :   __Pyx_RefNannyFinishContext();
   10339           0 :   return __pyx_r;
   10340             : }
   10341             : 
   10342           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   10343           0 :   Py_ssize_t __pyx_8genexpr1__pyx_v_stride;
   10344           0 :   PyObject *__pyx_r = NULL;
   10345             :   __Pyx_RefNannyDeclarations
   10346           0 :   int __pyx_t_1;
   10347           0 :   PyObject *__pyx_t_2 = NULL;
   10348           0 :   Py_ssize_t *__pyx_t_3;
   10349           0 :   Py_ssize_t *__pyx_t_4;
   10350           0 :   Py_ssize_t *__pyx_t_5;
   10351           0 :   PyObject *__pyx_t_6 = NULL;
   10352           0 :   int __pyx_lineno = 0;
   10353           0 :   const char *__pyx_filename = NULL;
   10354           0 :   int __pyx_clineno = 0;
   10355           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   10356             : 
   10357             :   /* "View.MemoryView":573
   10358             :  *     @property
   10359             :  *     def strides(self):
   10360             :  *         if self.view.strides == NULL:             # <<<<<<<<<<<<<<
   10361             :  * 
   10362             :  *             raise ValueError, "Buffer view does not expose strides"
   10363             :  */
   10364           0 :   __pyx_t_1 = (__pyx_v_self->view.strides == NULL);
   10365           0 :   if (unlikely(__pyx_t_1)) {
   10366             : 
   10367             :     /* "View.MemoryView":575
   10368             :  *         if self.view.strides == NULL:
   10369             :  * 
   10370             :  *             raise ValueError, "Buffer view does not expose strides"             # <<<<<<<<<<<<<<
   10371             :  * 
   10372             :  *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])
   10373             :  */
   10374           0 :     __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Buffer_view_does_not_expose_stri, 0, 0);
   10375           0 :     __PYX_ERR(1, 575, __pyx_L1_error)
   10376             : 
   10377             :     /* "View.MemoryView":573
   10378             :  *     @property
   10379             :  *     def strides(self):
   10380             :  *         if self.view.strides == NULL:             # <<<<<<<<<<<<<<
   10381             :  * 
   10382             :  *             raise ValueError, "Buffer view does not expose strides"
   10383             :  */
   10384             :   }
   10385             : 
   10386             :   /* "View.MemoryView":577
   10387             :  *             raise ValueError, "Buffer view does not expose strides"
   10388             :  * 
   10389             :  *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])             # <<<<<<<<<<<<<<
   10390             :  * 
   10391             :  *     @property
   10392             :  */
   10393           0 :   __Pyx_XDECREF(__pyx_r);
   10394             :   { /* enter inner scope */
   10395           0 :     __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 577, __pyx_L1_error)
   10396           0 :     __Pyx_GOTREF(__pyx_t_2);
   10397           0 :     __pyx_t_4 = (__pyx_v_self->view.strides + __pyx_v_self->view.ndim);
   10398           0 :     for (__pyx_t_5 = __pyx_v_self->view.strides; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
   10399           0 :       __pyx_t_3 = __pyx_t_5;
   10400           0 :       __pyx_8genexpr1__pyx_v_stride = (__pyx_t_3[0]);
   10401           0 :       __pyx_t_6 = PyInt_FromSsize_t(__pyx_8genexpr1__pyx_v_stride); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 577, __pyx_L1_error)
   10402           0 :       __Pyx_GOTREF(__pyx_t_6);
   10403           0 :       if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 577, __pyx_L1_error)
   10404           0 :       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   10405             :     }
   10406             :   } /* exit inner scope */
   10407           0 :   __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 577, __pyx_L1_error)
   10408           0 :   __Pyx_GOTREF(__pyx_t_6);
   10409           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   10410           0 :   __pyx_r = __pyx_t_6;
   10411           0 :   __pyx_t_6 = 0;
   10412           0 :   goto __pyx_L0;
   10413             : 
   10414             :   /* "View.MemoryView":571
   10415             :  *         return tuple([length for length in self.view.shape[:self.view.ndim]])
   10416             :  * 
   10417             :  *     @property             # <<<<<<<<<<<<<<
   10418             :  *     def strides(self):
   10419             :  *         if self.view.strides == NULL:
   10420             :  */
   10421             : 
   10422             :   /* function exit code */
   10423           0 :   __pyx_L1_error:;
   10424           0 :   __Pyx_XDECREF(__pyx_t_2);
   10425           0 :   __Pyx_XDECREF(__pyx_t_6);
   10426           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.strides.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10427           0 :   __pyx_r = NULL;
   10428           0 :   __pyx_L0:;
   10429           0 :   __Pyx_XGIVEREF(__pyx_r);
   10430           0 :   __Pyx_RefNannyFinishContext();
   10431           0 :   return __pyx_r;
   10432             : }
   10433             : 
   10434             : /* "View.MemoryView":579
   10435             :  *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])
   10436             :  * 
   10437             :  *     @property             # <<<<<<<<<<<<<<
   10438             :  *     def suboffsets(self):
   10439             :  *         if self.view.suboffsets == NULL:
   10440             :  */
   10441             : 
   10442             : /* Python wrapper */
   10443             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self); /*proto*/
   10444           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self) {
   10445           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10446           0 :   PyObject *__pyx_r = 0;
   10447             :   __Pyx_RefNannyDeclarations
   10448           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   10449           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10450           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   10451             : 
   10452             :   /* function exit code */
   10453           0 :   __Pyx_RefNannyFinishContext();
   10454           0 :   return __pyx_r;
   10455             : }
   10456             : 
   10457           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   10458           0 :   Py_ssize_t __pyx_8genexpr2__pyx_v_suboffset;
   10459           0 :   PyObject *__pyx_r = NULL;
   10460             :   __Pyx_RefNannyDeclarations
   10461           0 :   int __pyx_t_1;
   10462           0 :   PyObject *__pyx_t_2 = NULL;
   10463           0 :   Py_ssize_t *__pyx_t_3;
   10464           0 :   Py_ssize_t *__pyx_t_4;
   10465           0 :   Py_ssize_t *__pyx_t_5;
   10466           0 :   PyObject *__pyx_t_6 = NULL;
   10467           0 :   int __pyx_lineno = 0;
   10468           0 :   const char *__pyx_filename = NULL;
   10469           0 :   int __pyx_clineno = 0;
   10470           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   10471             : 
   10472             :   /* "View.MemoryView":581
   10473             :  *     @property
   10474             :  *     def suboffsets(self):
   10475             :  *         if self.view.suboffsets == NULL:             # <<<<<<<<<<<<<<
   10476             :  *             return (-1,) * self.view.ndim
   10477             :  * 
   10478             :  */
   10479           0 :   __pyx_t_1 = (__pyx_v_self->view.suboffsets == NULL);
   10480           0 :   if (__pyx_t_1) {
   10481             : 
   10482             :     /* "View.MemoryView":582
   10483             :  *     def suboffsets(self):
   10484             :  *         if self.view.suboffsets == NULL:
   10485             :  *             return (-1,) * self.view.ndim             # <<<<<<<<<<<<<<
   10486             :  * 
   10487             :  *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
   10488             :  */
   10489           0 :     __Pyx_XDECREF(__pyx_r);
   10490           0 :     __pyx_t_2 = __Pyx_PySequence_Multiply(__pyx_tuple__4, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 582, __pyx_L1_error)
   10491           0 :     __Pyx_GOTREF(__pyx_t_2);
   10492           0 :     __pyx_r = __pyx_t_2;
   10493           0 :     __pyx_t_2 = 0;
   10494           0 :     goto __pyx_L0;
   10495             : 
   10496             :     /* "View.MemoryView":581
   10497             :  *     @property
   10498             :  *     def suboffsets(self):
   10499             :  *         if self.view.suboffsets == NULL:             # <<<<<<<<<<<<<<
   10500             :  *             return (-1,) * self.view.ndim
   10501             :  * 
   10502             :  */
   10503             :   }
   10504             : 
   10505             :   /* "View.MemoryView":584
   10506             :  *             return (-1,) * self.view.ndim
   10507             :  * 
   10508             :  *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])             # <<<<<<<<<<<<<<
   10509             :  * 
   10510             :  *     @property
   10511             :  */
   10512           0 :   __Pyx_XDECREF(__pyx_r);
   10513             :   { /* enter inner scope */
   10514           0 :     __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 584, __pyx_L1_error)
   10515           0 :     __Pyx_GOTREF(__pyx_t_2);
   10516           0 :     __pyx_t_4 = (__pyx_v_self->view.suboffsets + __pyx_v_self->view.ndim);
   10517           0 :     for (__pyx_t_5 = __pyx_v_self->view.suboffsets; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
   10518           0 :       __pyx_t_3 = __pyx_t_5;
   10519           0 :       __pyx_8genexpr2__pyx_v_suboffset = (__pyx_t_3[0]);
   10520           0 :       __pyx_t_6 = PyInt_FromSsize_t(__pyx_8genexpr2__pyx_v_suboffset); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 584, __pyx_L1_error)
   10521           0 :       __Pyx_GOTREF(__pyx_t_6);
   10522           0 :       if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 584, __pyx_L1_error)
   10523           0 :       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   10524             :     }
   10525             :   } /* exit inner scope */
   10526           0 :   __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 584, __pyx_L1_error)
   10527           0 :   __Pyx_GOTREF(__pyx_t_6);
   10528           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   10529           0 :   __pyx_r = __pyx_t_6;
   10530           0 :   __pyx_t_6 = 0;
   10531           0 :   goto __pyx_L0;
   10532             : 
   10533             :   /* "View.MemoryView":579
   10534             :  *         return tuple([stride for stride in self.view.strides[:self.view.ndim]])
   10535             :  * 
   10536             :  *     @property             # <<<<<<<<<<<<<<
   10537             :  *     def suboffsets(self):
   10538             :  *         if self.view.suboffsets == NULL:
   10539             :  */
   10540             : 
   10541             :   /* function exit code */
   10542           0 :   __pyx_L1_error:;
   10543           0 :   __Pyx_XDECREF(__pyx_t_2);
   10544           0 :   __Pyx_XDECREF(__pyx_t_6);
   10545           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.suboffsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10546           0 :   __pyx_r = NULL;
   10547           0 :   __pyx_L0:;
   10548           0 :   __Pyx_XGIVEREF(__pyx_r);
   10549           0 :   __Pyx_RefNannyFinishContext();
   10550           0 :   return __pyx_r;
   10551             : }
   10552             : 
   10553             : /* "View.MemoryView":586
   10554             :  *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
   10555             :  * 
   10556             :  *     @property             # <<<<<<<<<<<<<<
   10557             :  *     def ndim(self):
   10558             :  *         return self.view.ndim
   10559             :  */
   10560             : 
   10561             : /* Python wrapper */
   10562             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/
   10563           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self) {
   10564           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10565           0 :   PyObject *__pyx_r = 0;
   10566             :   __Pyx_RefNannyDeclarations
   10567           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   10568           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10569           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   10570             : 
   10571             :   /* function exit code */
   10572           0 :   __Pyx_RefNannyFinishContext();
   10573           0 :   return __pyx_r;
   10574             : }
   10575             : 
   10576           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   10577           0 :   PyObject *__pyx_r = NULL;
   10578             :   __Pyx_RefNannyDeclarations
   10579           0 :   PyObject *__pyx_t_1 = NULL;
   10580           0 :   int __pyx_lineno = 0;
   10581           0 :   const char *__pyx_filename = NULL;
   10582           0 :   int __pyx_clineno = 0;
   10583           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   10584             : 
   10585             :   /* "View.MemoryView":588
   10586             :  *     @property
   10587             :  *     def ndim(self):
   10588             :  *         return self.view.ndim             # <<<<<<<<<<<<<<
   10589             :  * 
   10590             :  *     @property
   10591             :  */
   10592           0 :   __Pyx_XDECREF(__pyx_r);
   10593           0 :   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 588, __pyx_L1_error)
   10594           0 :   __Pyx_GOTREF(__pyx_t_1);
   10595           0 :   __pyx_r = __pyx_t_1;
   10596           0 :   __pyx_t_1 = 0;
   10597           0 :   goto __pyx_L0;
   10598             : 
   10599             :   /* "View.MemoryView":586
   10600             :  *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
   10601             :  * 
   10602             :  *     @property             # <<<<<<<<<<<<<<
   10603             :  *     def ndim(self):
   10604             :  *         return self.view.ndim
   10605             :  */
   10606             : 
   10607             :   /* function exit code */
   10608           0 :   __pyx_L1_error:;
   10609           0 :   __Pyx_XDECREF(__pyx_t_1);
   10610           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10611           0 :   __pyx_r = NULL;
   10612           0 :   __pyx_L0:;
   10613           0 :   __Pyx_XGIVEREF(__pyx_r);
   10614           0 :   __Pyx_RefNannyFinishContext();
   10615           0 :   return __pyx_r;
   10616             : }
   10617             : 
   10618             : /* "View.MemoryView":590
   10619             :  *         return self.view.ndim
   10620             :  * 
   10621             :  *     @property             # <<<<<<<<<<<<<<
   10622             :  *     def itemsize(self):
   10623             :  *         return self.view.itemsize
   10624             :  */
   10625             : 
   10626             : /* Python wrapper */
   10627             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self); /*proto*/
   10628           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self) {
   10629           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10630           0 :   PyObject *__pyx_r = 0;
   10631             :   __Pyx_RefNannyDeclarations
   10632           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   10633           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10634           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   10635             : 
   10636             :   /* function exit code */
   10637           0 :   __Pyx_RefNannyFinishContext();
   10638           0 :   return __pyx_r;
   10639             : }
   10640             : 
   10641           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   10642           0 :   PyObject *__pyx_r = NULL;
   10643             :   __Pyx_RefNannyDeclarations
   10644           0 :   PyObject *__pyx_t_1 = NULL;
   10645           0 :   int __pyx_lineno = 0;
   10646           0 :   const char *__pyx_filename = NULL;
   10647           0 :   int __pyx_clineno = 0;
   10648           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   10649             : 
   10650             :   /* "View.MemoryView":592
   10651             :  *     @property
   10652             :  *     def itemsize(self):
   10653             :  *         return self.view.itemsize             # <<<<<<<<<<<<<<
   10654             :  * 
   10655             :  *     @property
   10656             :  */
   10657           0 :   __Pyx_XDECREF(__pyx_r);
   10658           0 :   __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 592, __pyx_L1_error)
   10659           0 :   __Pyx_GOTREF(__pyx_t_1);
   10660           0 :   __pyx_r = __pyx_t_1;
   10661           0 :   __pyx_t_1 = 0;
   10662           0 :   goto __pyx_L0;
   10663             : 
   10664             :   /* "View.MemoryView":590
   10665             :  *         return self.view.ndim
   10666             :  * 
   10667             :  *     @property             # <<<<<<<<<<<<<<
   10668             :  *     def itemsize(self):
   10669             :  *         return self.view.itemsize
   10670             :  */
   10671             : 
   10672             :   /* function exit code */
   10673           0 :   __pyx_L1_error:;
   10674           0 :   __Pyx_XDECREF(__pyx_t_1);
   10675           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.itemsize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10676           0 :   __pyx_r = NULL;
   10677           0 :   __pyx_L0:;
   10678           0 :   __Pyx_XGIVEREF(__pyx_r);
   10679           0 :   __Pyx_RefNannyFinishContext();
   10680           0 :   return __pyx_r;
   10681             : }
   10682             : 
   10683             : /* "View.MemoryView":594
   10684             :  *         return self.view.itemsize
   10685             :  * 
   10686             :  *     @property             # <<<<<<<<<<<<<<
   10687             :  *     def nbytes(self):
   10688             :  *         return self.size * self.view.itemsize
   10689             :  */
   10690             : 
   10691             : /* Python wrapper */
   10692             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self); /*proto*/
   10693           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self) {
   10694           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10695           0 :   PyObject *__pyx_r = 0;
   10696             :   __Pyx_RefNannyDeclarations
   10697           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   10698           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10699           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   10700             : 
   10701             :   /* function exit code */
   10702           0 :   __Pyx_RefNannyFinishContext();
   10703           0 :   return __pyx_r;
   10704             : }
   10705             : 
   10706           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   10707           0 :   PyObject *__pyx_r = NULL;
   10708             :   __Pyx_RefNannyDeclarations
   10709           0 :   PyObject *__pyx_t_1 = NULL;
   10710           0 :   PyObject *__pyx_t_2 = NULL;
   10711           0 :   PyObject *__pyx_t_3 = NULL;
   10712           0 :   int __pyx_lineno = 0;
   10713           0 :   const char *__pyx_filename = NULL;
   10714           0 :   int __pyx_clineno = 0;
   10715           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   10716             : 
   10717             :   /* "View.MemoryView":596
   10718             :  *     @property
   10719             :  *     def nbytes(self):
   10720             :  *         return self.size * self.view.itemsize             # <<<<<<<<<<<<<<
   10721             :  * 
   10722             :  *     @property
   10723             :  */
   10724           0 :   __Pyx_XDECREF(__pyx_r);
   10725           0 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 596, __pyx_L1_error)
   10726           0 :   __Pyx_GOTREF(__pyx_t_1);
   10727           0 :   __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 596, __pyx_L1_error)
   10728           0 :   __Pyx_GOTREF(__pyx_t_2);
   10729           0 :   __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 596, __pyx_L1_error)
   10730           0 :   __Pyx_GOTREF(__pyx_t_3);
   10731           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   10732           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   10733           0 :   __pyx_r = __pyx_t_3;
   10734           0 :   __pyx_t_3 = 0;
   10735           0 :   goto __pyx_L0;
   10736             : 
   10737             :   /* "View.MemoryView":594
   10738             :  *         return self.view.itemsize
   10739             :  * 
   10740             :  *     @property             # <<<<<<<<<<<<<<
   10741             :  *     def nbytes(self):
   10742             :  *         return self.size * self.view.itemsize
   10743             :  */
   10744             : 
   10745             :   /* function exit code */
   10746           0 :   __pyx_L1_error:;
   10747           0 :   __Pyx_XDECREF(__pyx_t_1);
   10748           0 :   __Pyx_XDECREF(__pyx_t_2);
   10749           0 :   __Pyx_XDECREF(__pyx_t_3);
   10750           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10751           0 :   __pyx_r = NULL;
   10752           0 :   __pyx_L0:;
   10753           0 :   __Pyx_XGIVEREF(__pyx_r);
   10754           0 :   __Pyx_RefNannyFinishContext();
   10755           0 :   return __pyx_r;
   10756             : }
   10757             : 
   10758             : /* "View.MemoryView":598
   10759             :  *         return self.size * self.view.itemsize
   10760             :  * 
   10761             :  *     @property             # <<<<<<<<<<<<<<
   10762             :  *     def size(self):
   10763             :  *         if self._size is None:
   10764             :  */
   10765             : 
   10766             : /* Python wrapper */
   10767             : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
   10768           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self) {
   10769           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10770           0 :   PyObject *__pyx_r = 0;
   10771             :   __Pyx_RefNannyDeclarations
   10772           0 :   __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
   10773           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10774           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   10775             : 
   10776             :   /* function exit code */
   10777           0 :   __Pyx_RefNannyFinishContext();
   10778           0 :   return __pyx_r;
   10779             : }
   10780             : 
   10781           0 : static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
   10782           0 :   PyObject *__pyx_v_result = NULL;
   10783           0 :   PyObject *__pyx_v_length = NULL;
   10784           0 :   PyObject *__pyx_r = NULL;
   10785             :   __Pyx_RefNannyDeclarations
   10786           0 :   int __pyx_t_1;
   10787           0 :   Py_ssize_t *__pyx_t_2;
   10788           0 :   Py_ssize_t *__pyx_t_3;
   10789           0 :   Py_ssize_t *__pyx_t_4;
   10790           0 :   PyObject *__pyx_t_5 = NULL;
   10791           0 :   int __pyx_lineno = 0;
   10792           0 :   const char *__pyx_filename = NULL;
   10793           0 :   int __pyx_clineno = 0;
   10794           0 :   __Pyx_RefNannySetupContext("__get__", 1);
   10795             : 
   10796             :   /* "View.MemoryView":600
   10797             :  *     @property
   10798             :  *     def size(self):
   10799             :  *         if self._size is None:             # <<<<<<<<<<<<<<
   10800             :  *             result = 1
   10801             :  * 
   10802             :  */
   10803           0 :   __pyx_t_1 = (__pyx_v_self->_size == Py_None);
   10804           0 :   if (__pyx_t_1) {
   10805             : 
   10806             :     /* "View.MemoryView":601
   10807             :  *     def size(self):
   10808             :  *         if self._size is None:
   10809             :  *             result = 1             # <<<<<<<<<<<<<<
   10810             :  * 
   10811             :  *             for length in self.view.shape[:self.view.ndim]:
   10812             :  */
   10813           0 :     __Pyx_INCREF(__pyx_int_1);
   10814           0 :     __pyx_v_result = __pyx_int_1;
   10815             : 
   10816             :     /* "View.MemoryView":603
   10817             :  *             result = 1
   10818             :  * 
   10819             :  *             for length in self.view.shape[:self.view.ndim]:             # <<<<<<<<<<<<<<
   10820             :  *                 result *= length
   10821             :  * 
   10822             :  */
   10823           0 :     __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
   10824           0 :     for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
   10825           0 :       __pyx_t_2 = __pyx_t_4;
   10826           0 :       __pyx_t_5 = PyInt_FromSsize_t((__pyx_t_2[0])); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 603, __pyx_L1_error)
   10827           0 :       __Pyx_GOTREF(__pyx_t_5);
   10828           0 :       __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_5);
   10829           0 :       __pyx_t_5 = 0;
   10830             : 
   10831             :       /* "View.MemoryView":604
   10832             :  * 
   10833             :  *             for length in self.view.shape[:self.view.ndim]:
   10834             :  *                 result *= length             # <<<<<<<<<<<<<<
   10835             :  * 
   10836             :  *             self._size = result
   10837             :  */
   10838           0 :       __pyx_t_5 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 604, __pyx_L1_error)
   10839           0 :       __Pyx_GOTREF(__pyx_t_5);
   10840           0 :       __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_5);
   10841           0 :       __pyx_t_5 = 0;
   10842             :     }
   10843             : 
   10844             :     /* "View.MemoryView":606
   10845             :  *                 result *= length
   10846             :  * 
   10847             :  *             self._size = result             # <<<<<<<<<<<<<<
   10848             :  * 
   10849             :  *         return self._size
   10850             :  */
   10851           0 :     __Pyx_INCREF(__pyx_v_result);
   10852           0 :     __Pyx_GIVEREF(__pyx_v_result);
   10853           0 :     __Pyx_GOTREF(__pyx_v_self->_size);
   10854           0 :     __Pyx_DECREF(__pyx_v_self->_size);
   10855           0 :     __pyx_v_self->_size = __pyx_v_result;
   10856             : 
   10857             :     /* "View.MemoryView":600
   10858             :  *     @property
   10859             :  *     def size(self):
   10860             :  *         if self._size is None:             # <<<<<<<<<<<<<<
   10861             :  *             result = 1
   10862             :  * 
   10863             :  */
   10864             :   }
   10865             : 
   10866             :   /* "View.MemoryView":608
   10867             :  *             self._size = result
   10868             :  * 
   10869             :  *         return self._size             # <<<<<<<<<<<<<<
   10870             :  * 
   10871             :  *     def __len__(self):
   10872             :  */
   10873           0 :   __Pyx_XDECREF(__pyx_r);
   10874           0 :   __Pyx_INCREF(__pyx_v_self->_size);
   10875           0 :   __pyx_r = __pyx_v_self->_size;
   10876           0 :   goto __pyx_L0;
   10877             : 
   10878             :   /* "View.MemoryView":598
   10879             :  *         return self.size * self.view.itemsize
   10880             :  * 
   10881             :  *     @property             # <<<<<<<<<<<<<<
   10882             :  *     def size(self):
   10883             :  *         if self._size is None:
   10884             :  */
   10885             : 
   10886             :   /* function exit code */
   10887           0 :   __pyx_L1_error:;
   10888           0 :   __Pyx_XDECREF(__pyx_t_5);
   10889           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   10890           0 :   __pyx_r = NULL;
   10891           0 :   __pyx_L0:;
   10892           0 :   __Pyx_XDECREF(__pyx_v_result);
   10893           0 :   __Pyx_XDECREF(__pyx_v_length);
   10894           0 :   __Pyx_XGIVEREF(__pyx_r);
   10895           0 :   __Pyx_RefNannyFinishContext();
   10896           0 :   return __pyx_r;
   10897             : }
   10898             : 
   10899             : /* "View.MemoryView":610
   10900             :  *         return self._size
   10901             :  * 
   10902             :  *     def __len__(self):             # <<<<<<<<<<<<<<
   10903             :  *         if self.view.ndim >= 1:
   10904             :  *             return self.view.shape[0]
   10905             :  */
   10906             : 
   10907             : /* Python wrapper */
   10908             : static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self); /*proto*/
   10909           0 : static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self) {
   10910           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10911           0 :   Py_ssize_t __pyx_r;
   10912             :   __Pyx_RefNannyDeclarations
   10913           0 :   __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
   10914           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10915           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   10916             : 
   10917             :   /* function exit code */
   10918           0 :   __Pyx_RefNannyFinishContext();
   10919           0 :   return __pyx_r;
   10920             : }
   10921             : 
   10922           0 : static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self) {
   10923           0 :   Py_ssize_t __pyx_r;
   10924           0 :   int __pyx_t_1;
   10925             : 
   10926             :   /* "View.MemoryView":611
   10927             :  * 
   10928             :  *     def __len__(self):
   10929             :  *         if self.view.ndim >= 1:             # <<<<<<<<<<<<<<
   10930             :  *             return self.view.shape[0]
   10931             :  * 
   10932             :  */
   10933           0 :   __pyx_t_1 = (__pyx_v_self->view.ndim >= 1);
   10934           0 :   if (__pyx_t_1) {
   10935             : 
   10936             :     /* "View.MemoryView":612
   10937             :  *     def __len__(self):
   10938             :  *         if self.view.ndim >= 1:
   10939             :  *             return self.view.shape[0]             # <<<<<<<<<<<<<<
   10940             :  * 
   10941             :  *         return 0
   10942             :  */
   10943           0 :     __pyx_r = (__pyx_v_self->view.shape[0]);
   10944           0 :     goto __pyx_L0;
   10945             : 
   10946             :     /* "View.MemoryView":611
   10947             :  * 
   10948             :  *     def __len__(self):
   10949             :  *         if self.view.ndim >= 1:             # <<<<<<<<<<<<<<
   10950             :  *             return self.view.shape[0]
   10951             :  * 
   10952             :  */
   10953             :   }
   10954             : 
   10955             :   /* "View.MemoryView":614
   10956             :  *             return self.view.shape[0]
   10957             :  * 
   10958             :  *         return 0             # <<<<<<<<<<<<<<
   10959             :  * 
   10960             :  *     def __repr__(self):
   10961             :  */
   10962           0 :   __pyx_r = 0;
   10963           0 :   goto __pyx_L0;
   10964             : 
   10965             :   /* "View.MemoryView":610
   10966             :  *         return self._size
   10967             :  * 
   10968             :  *     def __len__(self):             # <<<<<<<<<<<<<<
   10969             :  *         if self.view.ndim >= 1:
   10970             :  *             return self.view.shape[0]
   10971             :  */
   10972             : 
   10973             :   /* function exit code */
   10974           0 :   __pyx_L0:;
   10975           0 :   return __pyx_r;
   10976             : }
   10977             : 
   10978             : /* "View.MemoryView":616
   10979             :  *         return 0
   10980             :  * 
   10981             :  *     def __repr__(self):             # <<<<<<<<<<<<<<
   10982             :  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
   10983             :  *                                                id(self))
   10984             :  */
   10985             : 
   10986             : /* Python wrapper */
   10987             : static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self); /*proto*/
   10988           0 : static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self) {
   10989           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   10990           0 :   PyObject *__pyx_r = 0;
   10991             :   __Pyx_RefNannyDeclarations
   10992           0 :   __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
   10993           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   10994           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   10995             : 
   10996             :   /* function exit code */
   10997           0 :   __Pyx_RefNannyFinishContext();
   10998           0 :   return __pyx_r;
   10999             : }
   11000             : 
   11001           0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self) {
   11002           0 :   PyObject *__pyx_r = NULL;
   11003             :   __Pyx_RefNannyDeclarations
   11004           0 :   PyObject *__pyx_t_1 = NULL;
   11005           0 :   PyObject *__pyx_t_2 = NULL;
   11006           0 :   PyObject *__pyx_t_3 = NULL;
   11007           0 :   int __pyx_lineno = 0;
   11008           0 :   const char *__pyx_filename = NULL;
   11009           0 :   int __pyx_clineno = 0;
   11010           0 :   __Pyx_RefNannySetupContext("__repr__", 1);
   11011             : 
   11012             :   /* "View.MemoryView":617
   11013             :  * 
   11014             :  *     def __repr__(self):
   11015             :  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,             # <<<<<<<<<<<<<<
   11016             :  *                                                id(self))
   11017             :  * 
   11018             :  */
   11019           0 :   __Pyx_XDECREF(__pyx_r);
   11020           0 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 617, __pyx_L1_error)
   11021           0 :   __Pyx_GOTREF(__pyx_t_1);
   11022           0 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 617, __pyx_L1_error)
   11023           0 :   __Pyx_GOTREF(__pyx_t_2);
   11024           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   11025           0 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 617, __pyx_L1_error)
   11026           0 :   __Pyx_GOTREF(__pyx_t_1);
   11027           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   11028             : 
   11029             :   /* "View.MemoryView":618
   11030             :  *     def __repr__(self):
   11031             :  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
   11032             :  *                                                id(self))             # <<<<<<<<<<<<<<
   11033             :  * 
   11034             :  *     def __str__(self):
   11035             :  */
   11036           0 :   __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 618, __pyx_L1_error)
   11037           0 :   __Pyx_GOTREF(__pyx_t_2);
   11038             : 
   11039             :   /* "View.MemoryView":617
   11040             :  * 
   11041             :  *     def __repr__(self):
   11042             :  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,             # <<<<<<<<<<<<<<
   11043             :  *                                                id(self))
   11044             :  * 
   11045             :  */
   11046           0 :   __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 617, __pyx_L1_error)
   11047           0 :   __Pyx_GOTREF(__pyx_t_3);
   11048           0 :   __Pyx_GIVEREF(__pyx_t_1);
   11049           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(1, 617, __pyx_L1_error);
   11050           0 :   __Pyx_GIVEREF(__pyx_t_2);
   11051           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(1, 617, __pyx_L1_error);
   11052           0 :   __pyx_t_1 = 0;
   11053           0 :   __pyx_t_2 = 0;
   11054           0 :   __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 617, __pyx_L1_error)
   11055           0 :   __Pyx_GOTREF(__pyx_t_2);
   11056           0 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   11057           0 :   __pyx_r = __pyx_t_2;
   11058           0 :   __pyx_t_2 = 0;
   11059           0 :   goto __pyx_L0;
   11060             : 
   11061             :   /* "View.MemoryView":616
   11062             :  *         return 0
   11063             :  * 
   11064             :  *     def __repr__(self):             # <<<<<<<<<<<<<<
   11065             :  *         return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
   11066             :  *                                                id(self))
   11067             :  */
   11068             : 
   11069             :   /* function exit code */
   11070           0 :   __pyx_L1_error:;
   11071           0 :   __Pyx_XDECREF(__pyx_t_1);
   11072           0 :   __Pyx_XDECREF(__pyx_t_2);
   11073           0 :   __Pyx_XDECREF(__pyx_t_3);
   11074           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11075           0 :   __pyx_r = NULL;
   11076           0 :   __pyx_L0:;
   11077           0 :   __Pyx_XGIVEREF(__pyx_r);
   11078           0 :   __Pyx_RefNannyFinishContext();
   11079           0 :   return __pyx_r;
   11080             : }
   11081             : 
   11082             : /* "View.MemoryView":620
   11083             :  *                                                id(self))
   11084             :  * 
   11085             :  *     def __str__(self):             # <<<<<<<<<<<<<<
   11086             :  *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
   11087             :  * 
   11088             :  */
   11089             : 
   11090             : /* Python wrapper */
   11091             : static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self); /*proto*/
   11092           0 : static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self) {
   11093           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11094           0 :   PyObject *__pyx_r = 0;
   11095             :   __Pyx_RefNannyDeclarations
   11096           0 :   __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
   11097           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   11098           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   11099             : 
   11100             :   /* function exit code */
   11101           0 :   __Pyx_RefNannyFinishContext();
   11102           0 :   return __pyx_r;
   11103             : }
   11104             : 
   11105           0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self) {
   11106           0 :   PyObject *__pyx_r = NULL;
   11107             :   __Pyx_RefNannyDeclarations
   11108           0 :   PyObject *__pyx_t_1 = NULL;
   11109           0 :   PyObject *__pyx_t_2 = NULL;
   11110           0 :   int __pyx_lineno = 0;
   11111           0 :   const char *__pyx_filename = NULL;
   11112           0 :   int __pyx_clineno = 0;
   11113           0 :   __Pyx_RefNannySetupContext("__str__", 1);
   11114             : 
   11115             :   /* "View.MemoryView":621
   11116             :  * 
   11117             :  *     def __str__(self):
   11118             :  *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)             # <<<<<<<<<<<<<<
   11119             :  * 
   11120             :  * 
   11121             :  */
   11122           0 :   __Pyx_XDECREF(__pyx_r);
   11123           0 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 621, __pyx_L1_error)
   11124           0 :   __Pyx_GOTREF(__pyx_t_1);
   11125           0 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 621, __pyx_L1_error)
   11126           0 :   __Pyx_GOTREF(__pyx_t_2);
   11127           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   11128           0 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 621, __pyx_L1_error)
   11129           0 :   __Pyx_GOTREF(__pyx_t_1);
   11130           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   11131           0 :   __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 621, __pyx_L1_error)
   11132           0 :   __Pyx_GOTREF(__pyx_t_2);
   11133           0 :   __Pyx_GIVEREF(__pyx_t_1);
   11134           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(1, 621, __pyx_L1_error);
   11135           0 :   __pyx_t_1 = 0;
   11136           0 :   __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_object, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 621, __pyx_L1_error)
   11137           0 :   __Pyx_GOTREF(__pyx_t_1);
   11138           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   11139           0 :   __pyx_r = __pyx_t_1;
   11140           0 :   __pyx_t_1 = 0;
   11141           0 :   goto __pyx_L0;
   11142             : 
   11143             :   /* "View.MemoryView":620
   11144             :  *                                                id(self))
   11145             :  * 
   11146             :  *     def __str__(self):             # <<<<<<<<<<<<<<
   11147             :  *         return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
   11148             :  * 
   11149             :  */
   11150             : 
   11151             :   /* function exit code */
   11152           0 :   __pyx_L1_error:;
   11153           0 :   __Pyx_XDECREF(__pyx_t_1);
   11154           0 :   __Pyx_XDECREF(__pyx_t_2);
   11155           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11156           0 :   __pyx_r = NULL;
   11157           0 :   __pyx_L0:;
   11158           0 :   __Pyx_XGIVEREF(__pyx_r);
   11159           0 :   __Pyx_RefNannyFinishContext();
   11160           0 :   return __pyx_r;
   11161             : }
   11162             : 
   11163             : /* "View.MemoryView":624
   11164             :  * 
   11165             :  * 
   11166             :  *     def is_c_contig(self):             # <<<<<<<<<<<<<<
   11167             :  *         cdef __Pyx_memviewslice *mslice
   11168             :  *         cdef __Pyx_memviewslice tmp
   11169             :  */
   11170             : 
   11171             : /* Python wrapper */
   11172             : static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, 
   11173             : #if CYTHON_METH_FASTCALL
   11174             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11175             : #else
   11176             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11177             : #endif
   11178             : ); /*proto*/
   11179           0 : static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, 
   11180             : #if CYTHON_METH_FASTCALL
   11181             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11182             : #else
   11183             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11184             : #endif
   11185             : ) {
   11186             :   #if !CYTHON_METH_FASTCALL
   11187             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   11188             :   #endif
   11189           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11190           0 :   PyObject *__pyx_r = 0;
   11191             :   __Pyx_RefNannyDeclarations
   11192           0 :   __Pyx_RefNannySetupContext("is_c_contig (wrapper)", 0);
   11193             :   #if !CYTHON_METH_FASTCALL
   11194             :   #if CYTHON_ASSUME_SAFE_MACROS
   11195             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   11196             :   #else
   11197             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   11198             :   #endif
   11199             :   #endif
   11200           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   11201           0 :   if (unlikely(__pyx_nargs > 0)) {
   11202           0 :     __Pyx_RaiseArgtupleInvalid("is_c_contig", 1, 0, 0, __pyx_nargs); return NULL;}
   11203           0 :   if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "is_c_contig", 0))) return NULL;
   11204           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));
   11205             : 
   11206             :   /* function exit code */
   11207           0 :   __Pyx_RefNannyFinishContext();
   11208           0 :   return __pyx_r;
   11209             : }
   11210             : 
   11211           0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
   11212           0 :   __Pyx_memviewslice *__pyx_v_mslice;
   11213           0 :   __Pyx_memviewslice __pyx_v_tmp;
   11214           0 :   PyObject *__pyx_r = NULL;
   11215             :   __Pyx_RefNannyDeclarations
   11216           0 :   __Pyx_memviewslice *__pyx_t_1;
   11217           0 :   PyObject *__pyx_t_2 = NULL;
   11218           0 :   int __pyx_lineno = 0;
   11219           0 :   const char *__pyx_filename = NULL;
   11220           0 :   int __pyx_clineno = 0;
   11221           0 :   __Pyx_RefNannySetupContext("is_c_contig", 1);
   11222             : 
   11223             :   /* "View.MemoryView":627
   11224             :  *         cdef __Pyx_memviewslice *mslice
   11225             :  *         cdef __Pyx_memviewslice tmp
   11226             :  *         mslice = get_slice_from_memview(self, &tmp)             # <<<<<<<<<<<<<<
   11227             :  *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
   11228             :  * 
   11229             :  */
   11230           0 :   __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 627, __pyx_L1_error)
   11231           0 :   __pyx_v_mslice = __pyx_t_1;
   11232             : 
   11233             :   /* "View.MemoryView":628
   11234             :  *         cdef __Pyx_memviewslice tmp
   11235             :  *         mslice = get_slice_from_memview(self, &tmp)
   11236             :  *         return slice_is_contig(mslice[0], 'C', self.view.ndim)             # <<<<<<<<<<<<<<
   11237             :  * 
   11238             :  *     def is_f_contig(self):
   11239             :  */
   11240           0 :   __Pyx_XDECREF(__pyx_r);
   11241           0 :   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 628, __pyx_L1_error)
   11242           0 :   __Pyx_GOTREF(__pyx_t_2);
   11243           0 :   __pyx_r = __pyx_t_2;
   11244           0 :   __pyx_t_2 = 0;
   11245           0 :   goto __pyx_L0;
   11246             : 
   11247             :   /* "View.MemoryView":624
   11248             :  * 
   11249             :  * 
   11250             :  *     def is_c_contig(self):             # <<<<<<<<<<<<<<
   11251             :  *         cdef __Pyx_memviewslice *mslice
   11252             :  *         cdef __Pyx_memviewslice tmp
   11253             :  */
   11254             : 
   11255             :   /* function exit code */
   11256           0 :   __pyx_L1_error:;
   11257           0 :   __Pyx_XDECREF(__pyx_t_2);
   11258           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.is_c_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11259           0 :   __pyx_r = NULL;
   11260           0 :   __pyx_L0:;
   11261           0 :   __Pyx_XGIVEREF(__pyx_r);
   11262           0 :   __Pyx_RefNannyFinishContext();
   11263           0 :   return __pyx_r;
   11264             : }
   11265             : 
   11266             : /* "View.MemoryView":630
   11267             :  *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
   11268             :  * 
   11269             :  *     def is_f_contig(self):             # <<<<<<<<<<<<<<
   11270             :  *         cdef __Pyx_memviewslice *mslice
   11271             :  *         cdef __Pyx_memviewslice tmp
   11272             :  */
   11273             : 
   11274             : /* Python wrapper */
   11275             : static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, 
   11276             : #if CYTHON_METH_FASTCALL
   11277             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11278             : #else
   11279             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11280             : #endif
   11281             : ); /*proto*/
   11282           0 : static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, 
   11283             : #if CYTHON_METH_FASTCALL
   11284             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11285             : #else
   11286             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11287             : #endif
   11288             : ) {
   11289             :   #if !CYTHON_METH_FASTCALL
   11290             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   11291             :   #endif
   11292           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11293           0 :   PyObject *__pyx_r = 0;
   11294             :   __Pyx_RefNannyDeclarations
   11295           0 :   __Pyx_RefNannySetupContext("is_f_contig (wrapper)", 0);
   11296             :   #if !CYTHON_METH_FASTCALL
   11297             :   #if CYTHON_ASSUME_SAFE_MACROS
   11298             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   11299             :   #else
   11300             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   11301             :   #endif
   11302             :   #endif
   11303           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   11304           0 :   if (unlikely(__pyx_nargs > 0)) {
   11305           0 :     __Pyx_RaiseArgtupleInvalid("is_f_contig", 1, 0, 0, __pyx_nargs); return NULL;}
   11306           0 :   if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "is_f_contig", 0))) return NULL;
   11307           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));
   11308             : 
   11309             :   /* function exit code */
   11310           0 :   __Pyx_RefNannyFinishContext();
   11311           0 :   return __pyx_r;
   11312             : }
   11313             : 
   11314           0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
   11315           0 :   __Pyx_memviewslice *__pyx_v_mslice;
   11316           0 :   __Pyx_memviewslice __pyx_v_tmp;
   11317           0 :   PyObject *__pyx_r = NULL;
   11318             :   __Pyx_RefNannyDeclarations
   11319           0 :   __Pyx_memviewslice *__pyx_t_1;
   11320           0 :   PyObject *__pyx_t_2 = NULL;
   11321           0 :   int __pyx_lineno = 0;
   11322           0 :   const char *__pyx_filename = NULL;
   11323           0 :   int __pyx_clineno = 0;
   11324           0 :   __Pyx_RefNannySetupContext("is_f_contig", 1);
   11325             : 
   11326             :   /* "View.MemoryView":633
   11327             :  *         cdef __Pyx_memviewslice *mslice
   11328             :  *         cdef __Pyx_memviewslice tmp
   11329             :  *         mslice = get_slice_from_memview(self, &tmp)             # <<<<<<<<<<<<<<
   11330             :  *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
   11331             :  * 
   11332             :  */
   11333           0 :   __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 633, __pyx_L1_error)
   11334           0 :   __pyx_v_mslice = __pyx_t_1;
   11335             : 
   11336             :   /* "View.MemoryView":634
   11337             :  *         cdef __Pyx_memviewslice tmp
   11338             :  *         mslice = get_slice_from_memview(self, &tmp)
   11339             :  *         return slice_is_contig(mslice[0], 'F', self.view.ndim)             # <<<<<<<<<<<<<<
   11340             :  * 
   11341             :  *     def copy(self):
   11342             :  */
   11343           0 :   __Pyx_XDECREF(__pyx_r);
   11344           0 :   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 634, __pyx_L1_error)
   11345           0 :   __Pyx_GOTREF(__pyx_t_2);
   11346           0 :   __pyx_r = __pyx_t_2;
   11347           0 :   __pyx_t_2 = 0;
   11348           0 :   goto __pyx_L0;
   11349             : 
   11350             :   /* "View.MemoryView":630
   11351             :  *         return slice_is_contig(mslice[0], 'C', self.view.ndim)
   11352             :  * 
   11353             :  *     def is_f_contig(self):             # <<<<<<<<<<<<<<
   11354             :  *         cdef __Pyx_memviewslice *mslice
   11355             :  *         cdef __Pyx_memviewslice tmp
   11356             :  */
   11357             : 
   11358             :   /* function exit code */
   11359           0 :   __pyx_L1_error:;
   11360           0 :   __Pyx_XDECREF(__pyx_t_2);
   11361           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.is_f_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11362           0 :   __pyx_r = NULL;
   11363           0 :   __pyx_L0:;
   11364           0 :   __Pyx_XGIVEREF(__pyx_r);
   11365           0 :   __Pyx_RefNannyFinishContext();
   11366           0 :   return __pyx_r;
   11367             : }
   11368             : 
   11369             : /* "View.MemoryView":636
   11370             :  *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
   11371             :  * 
   11372             :  *     def copy(self):             # <<<<<<<<<<<<<<
   11373             :  *         cdef __Pyx_memviewslice mslice
   11374             :  *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
   11375             :  */
   11376             : 
   11377             : /* Python wrapper */
   11378             : static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, 
   11379             : #if CYTHON_METH_FASTCALL
   11380             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11381             : #else
   11382             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11383             : #endif
   11384             : ); /*proto*/
   11385           0 : static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, 
   11386             : #if CYTHON_METH_FASTCALL
   11387             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11388             : #else
   11389             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11390             : #endif
   11391             : ) {
   11392             :   #if !CYTHON_METH_FASTCALL
   11393             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   11394             :   #endif
   11395           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11396           0 :   PyObject *__pyx_r = 0;
   11397             :   __Pyx_RefNannyDeclarations
   11398           0 :   __Pyx_RefNannySetupContext("copy (wrapper)", 0);
   11399             :   #if !CYTHON_METH_FASTCALL
   11400             :   #if CYTHON_ASSUME_SAFE_MACROS
   11401             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   11402             :   #else
   11403             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   11404             :   #endif
   11405             :   #endif
   11406           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   11407           0 :   if (unlikely(__pyx_nargs > 0)) {
   11408           0 :     __Pyx_RaiseArgtupleInvalid("copy", 1, 0, 0, __pyx_nargs); return NULL;}
   11409           0 :   if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "copy", 0))) return NULL;
   11410           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(((struct __pyx_memoryview_obj *)__pyx_v_self));
   11411             : 
   11412             :   /* function exit code */
   11413           0 :   __Pyx_RefNannyFinishContext();
   11414           0 :   return __pyx_r;
   11415             : }
   11416             : 
   11417           0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self) {
   11418           0 :   __Pyx_memviewslice __pyx_v_mslice;
   11419           0 :   int __pyx_v_flags;
   11420           0 :   PyObject *__pyx_r = NULL;
   11421             :   __Pyx_RefNannyDeclarations
   11422           0 :   __Pyx_memviewslice __pyx_t_1;
   11423           0 :   PyObject *__pyx_t_2 = NULL;
   11424           0 :   int __pyx_lineno = 0;
   11425           0 :   const char *__pyx_filename = NULL;
   11426           0 :   int __pyx_clineno = 0;
   11427           0 :   __Pyx_RefNannySetupContext("copy", 1);
   11428             : 
   11429             :   /* "View.MemoryView":638
   11430             :  *     def copy(self):
   11431             :  *         cdef __Pyx_memviewslice mslice
   11432             :  *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS             # <<<<<<<<<<<<<<
   11433             :  * 
   11434             :  *         slice_copy(self, &mslice)
   11435             :  */
   11436           0 :   __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_F_CONTIGUOUS));
   11437             : 
   11438             :   /* "View.MemoryView":640
   11439             :  *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
   11440             :  * 
   11441             :  *         slice_copy(self, &mslice)             # <<<<<<<<<<<<<<
   11442             :  *         mslice = slice_copy_contig(&mslice, "c", self.view.ndim,
   11443             :  *                                    self.view.itemsize,
   11444             :  */
   11445           0 :   __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_mslice));
   11446             : 
   11447             :   /* "View.MemoryView":641
   11448             :  * 
   11449             :  *         slice_copy(self, &mslice)
   11450             :  *         mslice = slice_copy_contig(&mslice, "c", self.view.ndim,             # <<<<<<<<<<<<<<
   11451             :  *                                    self.view.itemsize,
   11452             :  *                                    flags|PyBUF_C_CONTIGUOUS,
   11453             :  */
   11454           0 :   __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_mslice), ((char *)"c"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_C_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 641, __pyx_L1_error)
   11455           0 :   __pyx_v_mslice = __pyx_t_1;
   11456             : 
   11457             :   /* "View.MemoryView":646
   11458             :  *                                    self.dtype_is_object)
   11459             :  * 
   11460             :  *         return memoryview_copy_from_slice(self, &mslice)             # <<<<<<<<<<<<<<
   11461             :  * 
   11462             :  *     def copy_fortran(self):
   11463             :  */
   11464           0 :   __Pyx_XDECREF(__pyx_r);
   11465           0 :   __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_mslice)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 646, __pyx_L1_error)
   11466           0 :   __Pyx_GOTREF(__pyx_t_2);
   11467           0 :   __pyx_r = __pyx_t_2;
   11468           0 :   __pyx_t_2 = 0;
   11469           0 :   goto __pyx_L0;
   11470             : 
   11471             :   /* "View.MemoryView":636
   11472             :  *         return slice_is_contig(mslice[0], 'F', self.view.ndim)
   11473             :  * 
   11474             :  *     def copy(self):             # <<<<<<<<<<<<<<
   11475             :  *         cdef __Pyx_memviewslice mslice
   11476             :  *         cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
   11477             :  */
   11478             : 
   11479             :   /* function exit code */
   11480           0 :   __pyx_L1_error:;
   11481           0 :   __Pyx_XDECREF(__pyx_t_2);
   11482           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11483           0 :   __pyx_r = NULL;
   11484           0 :   __pyx_L0:;
   11485           0 :   __Pyx_XGIVEREF(__pyx_r);
   11486           0 :   __Pyx_RefNannyFinishContext();
   11487           0 :   return __pyx_r;
   11488             : }
   11489             : 
   11490             : /* "View.MemoryView":648
   11491             :  *         return memoryview_copy_from_slice(self, &mslice)
   11492             :  * 
   11493             :  *     def copy_fortran(self):             # <<<<<<<<<<<<<<
   11494             :  *         cdef __Pyx_memviewslice src, dst
   11495             :  *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
   11496             :  */
   11497             : 
   11498             : /* Python wrapper */
   11499             : static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, 
   11500             : #if CYTHON_METH_FASTCALL
   11501             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11502             : #else
   11503             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11504             : #endif
   11505             : ); /*proto*/
   11506           0 : static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, 
   11507             : #if CYTHON_METH_FASTCALL
   11508             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11509             : #else
   11510             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11511             : #endif
   11512             : ) {
   11513             :   #if !CYTHON_METH_FASTCALL
   11514             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   11515             :   #endif
   11516           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11517           0 :   PyObject *__pyx_r = 0;
   11518             :   __Pyx_RefNannyDeclarations
   11519           0 :   __Pyx_RefNannySetupContext("copy_fortran (wrapper)", 0);
   11520             :   #if !CYTHON_METH_FASTCALL
   11521             :   #if CYTHON_ASSUME_SAFE_MACROS
   11522             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   11523             :   #else
   11524             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   11525             :   #endif
   11526             :   #endif
   11527           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   11528           0 :   if (unlikely(__pyx_nargs > 0)) {
   11529           0 :     __Pyx_RaiseArgtupleInvalid("copy_fortran", 1, 0, 0, __pyx_nargs); return NULL;}
   11530           0 :   if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "copy_fortran", 0))) return NULL;
   11531           0 :   __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(((struct __pyx_memoryview_obj *)__pyx_v_self));
   11532             : 
   11533             :   /* function exit code */
   11534           0 :   __Pyx_RefNannyFinishContext();
   11535           0 :   return __pyx_r;
   11536             : }
   11537             : 
   11538           0 : static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self) {
   11539           0 :   __Pyx_memviewslice __pyx_v_src;
   11540           0 :   __Pyx_memviewslice __pyx_v_dst;
   11541           0 :   int __pyx_v_flags;
   11542           0 :   PyObject *__pyx_r = NULL;
   11543             :   __Pyx_RefNannyDeclarations
   11544           0 :   __Pyx_memviewslice __pyx_t_1;
   11545           0 :   PyObject *__pyx_t_2 = NULL;
   11546           0 :   int __pyx_lineno = 0;
   11547           0 :   const char *__pyx_filename = NULL;
   11548           0 :   int __pyx_clineno = 0;
   11549           0 :   __Pyx_RefNannySetupContext("copy_fortran", 1);
   11550             : 
   11551             :   /* "View.MemoryView":650
   11552             :  *     def copy_fortran(self):
   11553             :  *         cdef __Pyx_memviewslice src, dst
   11554             :  *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS             # <<<<<<<<<<<<<<
   11555             :  * 
   11556             :  *         slice_copy(self, &src)
   11557             :  */
   11558           0 :   __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_C_CONTIGUOUS));
   11559             : 
   11560             :   /* "View.MemoryView":652
   11561             :  *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
   11562             :  * 
   11563             :  *         slice_copy(self, &src)             # <<<<<<<<<<<<<<
   11564             :  *         dst = slice_copy_contig(&src, "fortran", self.view.ndim,
   11565             :  *                                 self.view.itemsize,
   11566             :  */
   11567           0 :   __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_src));
   11568             : 
   11569             :   /* "View.MemoryView":653
   11570             :  * 
   11571             :  *         slice_copy(self, &src)
   11572             :  *         dst = slice_copy_contig(&src, "fortran", self.view.ndim,             # <<<<<<<<<<<<<<
   11573             :  *                                 self.view.itemsize,
   11574             :  *                                 flags|PyBUF_F_CONTIGUOUS,
   11575             :  */
   11576           0 :   __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_src), ((char *)"fortran"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_F_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 653, __pyx_L1_error)
   11577           0 :   __pyx_v_dst = __pyx_t_1;
   11578             : 
   11579             :   /* "View.MemoryView":658
   11580             :  *                                 self.dtype_is_object)
   11581             :  * 
   11582             :  *         return memoryview_copy_from_slice(self, &dst)             # <<<<<<<<<<<<<<
   11583             :  * 
   11584             :  * 
   11585             :  */
   11586           0 :   __Pyx_XDECREF(__pyx_r);
   11587           0 :   __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_dst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 658, __pyx_L1_error)
   11588           0 :   __Pyx_GOTREF(__pyx_t_2);
   11589           0 :   __pyx_r = __pyx_t_2;
   11590           0 :   __pyx_t_2 = 0;
   11591           0 :   goto __pyx_L0;
   11592             : 
   11593             :   /* "View.MemoryView":648
   11594             :  *         return memoryview_copy_from_slice(self, &mslice)
   11595             :  * 
   11596             :  *     def copy_fortran(self):             # <<<<<<<<<<<<<<
   11597             :  *         cdef __Pyx_memviewslice src, dst
   11598             :  *         cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
   11599             :  */
   11600             : 
   11601             :   /* function exit code */
   11602           0 :   __pyx_L1_error:;
   11603           0 :   __Pyx_XDECREF(__pyx_t_2);
   11604           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.copy_fortran", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11605           0 :   __pyx_r = NULL;
   11606           0 :   __pyx_L0:;
   11607           0 :   __Pyx_XGIVEREF(__pyx_r);
   11608           0 :   __Pyx_RefNannyFinishContext();
   11609           0 :   return __pyx_r;
   11610             : }
   11611             : 
   11612             : /* "(tree fragment)":1
   11613             :  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
   11614             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   11615             :  * def __setstate_cython__(self, __pyx_state):
   11616             :  */
   11617             : 
   11618             : /* Python wrapper */
   11619             : static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, 
   11620             : #if CYTHON_METH_FASTCALL
   11621             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11622             : #else
   11623             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11624             : #endif
   11625             : ); /*proto*/
   11626           0 : static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, 
   11627             : #if CYTHON_METH_FASTCALL
   11628             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11629             : #else
   11630             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11631             : #endif
   11632             : ) {
   11633             :   #if !CYTHON_METH_FASTCALL
   11634             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   11635             :   #endif
   11636           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11637           0 :   PyObject *__pyx_r = 0;
   11638             :   __Pyx_RefNannyDeclarations
   11639           0 :   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
   11640             :   #if !CYTHON_METH_FASTCALL
   11641             :   #if CYTHON_ASSUME_SAFE_MACROS
   11642             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   11643             :   #else
   11644             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   11645             :   #endif
   11646             :   #endif
   11647           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   11648           0 :   if (unlikely(__pyx_nargs > 0)) {
   11649           0 :     __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
   11650           0 :   if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
   11651           0 :   __pyx_r = __pyx_pf___pyx_memoryview___reduce_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self));
   11652             : 
   11653             :   /* function exit code */
   11654           0 :   __Pyx_RefNannyFinishContext();
   11655           0 :   return __pyx_r;
   11656             : }
   11657             : 
   11658           0 : static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self) {
   11659           0 :   PyObject *__pyx_r = NULL;
   11660             :   __Pyx_RefNannyDeclarations
   11661           0 :   int __pyx_lineno = 0;
   11662           0 :   const char *__pyx_filename = NULL;
   11663           0 :   int __pyx_clineno = 0;
   11664           0 :   __Pyx_RefNannySetupContext("__reduce_cython__", 1);
   11665             : 
   11666             :   /* "(tree fragment)":2
   11667             :  * def __reduce_cython__(self):
   11668             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
   11669             :  * def __setstate_cython__(self, __pyx_state):
   11670             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   11671             :  */
   11672           0 :   __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
   11673           0 :   __PYX_ERR(1, 2, __pyx_L1_error)
   11674             : 
   11675             :   /* "(tree fragment)":1
   11676             :  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
   11677             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   11678             :  * def __setstate_cython__(self, __pyx_state):
   11679             :  */
   11680             : 
   11681             :   /* function exit code */
   11682           0 :   __pyx_L1_error:;
   11683           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11684           0 :   __pyx_r = NULL;
   11685           0 :   __Pyx_XGIVEREF(__pyx_r);
   11686           0 :   __Pyx_RefNannyFinishContext();
   11687           0 :   return __pyx_r;
   11688             : }
   11689             : 
   11690             : /* "(tree fragment)":3
   11691             :  * def __reduce_cython__(self):
   11692             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   11693             :  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
   11694             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   11695             :  */
   11696             : 
   11697             : /* Python wrapper */
   11698             : static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, 
   11699             : #if CYTHON_METH_FASTCALL
   11700             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11701             : #else
   11702             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11703             : #endif
   11704             : ); /*proto*/
   11705           0 : static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, 
   11706             : #if CYTHON_METH_FASTCALL
   11707             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   11708             : #else
   11709             : PyObject *__pyx_args, PyObject *__pyx_kwds
   11710             : #endif
   11711             : ) {
   11712           0 :   CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
   11713             :   #if !CYTHON_METH_FASTCALL
   11714             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   11715             :   #endif
   11716           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   11717           0 :   PyObject* values[1] = {0};
   11718           0 :   int __pyx_lineno = 0;
   11719           0 :   const char *__pyx_filename = NULL;
   11720           0 :   int __pyx_clineno = 0;
   11721           0 :   PyObject *__pyx_r = 0;
   11722             :   __Pyx_RefNannyDeclarations
   11723           0 :   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
   11724             :   #if !CYTHON_METH_FASTCALL
   11725             :   #if CYTHON_ASSUME_SAFE_MACROS
   11726             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   11727             :   #else
   11728             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   11729             :   #endif
   11730             :   #endif
   11731           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   11732             :   {
   11733           0 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
   11734           0 :     if (__pyx_kwds) {
   11735           0 :       Py_ssize_t kw_args;
   11736           0 :       switch (__pyx_nargs) {
   11737           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   11738           0 :         CYTHON_FALLTHROUGH;
   11739           0 :         case  0: break;
   11740           0 :         default: goto __pyx_L5_argtuple_error;
   11741             :       }
   11742           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   11743           0 :       switch (__pyx_nargs) {
   11744             :         case  0:
   11745           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
   11746           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   11747           0 :           kw_args--;
   11748             :         }
   11749           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
   11750           0 :         else goto __pyx_L5_argtuple_error;
   11751             :       }
   11752           0 :       if (unlikely(kw_args > 0)) {
   11753           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   11754           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
   11755             :       }
   11756           0 :     } else if (unlikely(__pyx_nargs != 1)) {
   11757           0 :       goto __pyx_L5_argtuple_error;
   11758             :     } else {
   11759           0 :       values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   11760             :     }
   11761           0 :     __pyx_v___pyx_state = values[0];
   11762             :   }
   11763           0 :   goto __pyx_L6_skip;
   11764           0 :   __pyx_L5_argtuple_error:;
   11765           0 :   __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
   11766           0 :   __pyx_L6_skip:;
   11767           0 :   goto __pyx_L4_argument_unpacking_done;
   11768           0 :   __pyx_L3_error:;
   11769             :   {
   11770           0 :     Py_ssize_t __pyx_temp;
   11771           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   11772             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   11773             :     }
   11774             :   }
   11775           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11776           0 :   __Pyx_RefNannyFinishContext();
   11777           0 :   return NULL;
   11778           0 :   __pyx_L4_argument_unpacking_done:;
   11779           0 :   __pyx_r = __pyx_pf___pyx_memoryview_2__setstate_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v___pyx_state);
   11780             : 
   11781             :   /* function exit code */
   11782             :   {
   11783           0 :     Py_ssize_t __pyx_temp;
   11784           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   11785             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   11786             :     }
   11787             :   }
   11788             :   __Pyx_RefNannyFinishContext();
   11789             :   return __pyx_r;
   11790             : }
   11791             : 
   11792           0 : static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
   11793           0 :   PyObject *__pyx_r = NULL;
   11794             :   __Pyx_RefNannyDeclarations
   11795           0 :   int __pyx_lineno = 0;
   11796           0 :   const char *__pyx_filename = NULL;
   11797           0 :   int __pyx_clineno = 0;
   11798           0 :   __Pyx_RefNannySetupContext("__setstate_cython__", 1);
   11799             : 
   11800             :   /* "(tree fragment)":4
   11801             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   11802             :  * def __setstate_cython__(self, __pyx_state):
   11803             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
   11804             :  */
   11805           0 :   __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
   11806           0 :   __PYX_ERR(1, 4, __pyx_L1_error)
   11807             : 
   11808             :   /* "(tree fragment)":3
   11809             :  * def __reduce_cython__(self):
   11810             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   11811             :  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
   11812             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   11813             :  */
   11814             : 
   11815             :   /* function exit code */
   11816           0 :   __pyx_L1_error:;
   11817           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11818           0 :   __pyx_r = NULL;
   11819           0 :   __Pyx_XGIVEREF(__pyx_r);
   11820           0 :   __Pyx_RefNannyFinishContext();
   11821           0 :   return __pyx_r;
   11822             : }
   11823             : 
   11824             : /* "View.MemoryView":662
   11825             :  * 
   11826             :  * @cname('__pyx_memoryview_new')
   11827             :  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):             # <<<<<<<<<<<<<<
   11828             :  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
   11829             :  *     result.typeinfo = typeinfo
   11830             :  */
   11831             : 
   11832         141 : static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, int __pyx_v_dtype_is_object, __Pyx_TypeInfo *__pyx_v_typeinfo) {
   11833         141 :   struct __pyx_memoryview_obj *__pyx_v_result = 0;
   11834         141 :   PyObject *__pyx_r = NULL;
   11835             :   __Pyx_RefNannyDeclarations
   11836         141 :   PyObject *__pyx_t_1 = NULL;
   11837         141 :   PyObject *__pyx_t_2 = NULL;
   11838         141 :   PyObject *__pyx_t_3 = NULL;
   11839         141 :   int __pyx_lineno = 0;
   11840         141 :   const char *__pyx_filename = NULL;
   11841         141 :   int __pyx_clineno = 0;
   11842         141 :   __Pyx_RefNannySetupContext("memoryview_cwrapper", 1);
   11843             : 
   11844             :   /* "View.MemoryView":663
   11845             :  * @cname('__pyx_memoryview_new')
   11846             :  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
   11847             :  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)             # <<<<<<<<<<<<<<
   11848             :  *     result.typeinfo = typeinfo
   11849             :  *     return result
   11850             :  */
   11851         141 :   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 663, __pyx_L1_error)
   11852         141 :   __Pyx_GOTREF(__pyx_t_1);
   11853         141 :   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 663, __pyx_L1_error)
   11854         141 :   __Pyx_GOTREF(__pyx_t_2);
   11855         141 :   __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 663, __pyx_L1_error)
   11856         141 :   __Pyx_GOTREF(__pyx_t_3);
   11857         141 :   __Pyx_INCREF(__pyx_v_o);
   11858         141 :   __Pyx_GIVEREF(__pyx_v_o);
   11859         141 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_o)) __PYX_ERR(1, 663, __pyx_L1_error);
   11860         141 :   __Pyx_GIVEREF(__pyx_t_1);
   11861         141 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 663, __pyx_L1_error);
   11862         141 :   __Pyx_GIVEREF(__pyx_t_2);
   11863         141 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2)) __PYX_ERR(1, 663, __pyx_L1_error);
   11864         141 :   __pyx_t_1 = 0;
   11865         141 :   __pyx_t_2 = 0;
   11866         141 :   __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 663, __pyx_L1_error)
   11867         141 :   __Pyx_GOTREF(__pyx_t_2);
   11868         141 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   11869         141 :   __pyx_v_result = ((struct __pyx_memoryview_obj *)__pyx_t_2);
   11870         141 :   __pyx_t_2 = 0;
   11871             : 
   11872             :   /* "View.MemoryView":664
   11873             :  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
   11874             :  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
   11875             :  *     result.typeinfo = typeinfo             # <<<<<<<<<<<<<<
   11876             :  *     return result
   11877             :  * 
   11878             :  */
   11879         141 :   __pyx_v_result->typeinfo = __pyx_v_typeinfo;
   11880             : 
   11881             :   /* "View.MemoryView":665
   11882             :  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
   11883             :  *     result.typeinfo = typeinfo
   11884             :  *     return result             # <<<<<<<<<<<<<<
   11885             :  * 
   11886             :  * @cname('__pyx_memoryview_check')
   11887             :  */
   11888         141 :   __Pyx_XDECREF(__pyx_r);
   11889         141 :   __Pyx_INCREF((PyObject *)__pyx_v_result);
   11890         141 :   __pyx_r = ((PyObject *)__pyx_v_result);
   11891         141 :   goto __pyx_L0;
   11892             : 
   11893             :   /* "View.MemoryView":662
   11894             :  * 
   11895             :  * @cname('__pyx_memoryview_new')
   11896             :  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):             # <<<<<<<<<<<<<<
   11897             :  *     cdef memoryview result = memoryview(o, flags, dtype_is_object)
   11898             :  *     result.typeinfo = typeinfo
   11899             :  */
   11900             : 
   11901             :   /* function exit code */
   11902           0 :   __pyx_L1_error:;
   11903           0 :   __Pyx_XDECREF(__pyx_t_1);
   11904           0 :   __Pyx_XDECREF(__pyx_t_2);
   11905           0 :   __Pyx_XDECREF(__pyx_t_3);
   11906           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
   11907           0 :   __pyx_r = 0;
   11908         141 :   __pyx_L0:;
   11909         141 :   __Pyx_XDECREF((PyObject *)__pyx_v_result);
   11910         141 :   __Pyx_XGIVEREF(__pyx_r);
   11911         141 :   __Pyx_RefNannyFinishContext();
   11912         141 :   return __pyx_r;
   11913             : }
   11914             : 
   11915             : /* "View.MemoryView":668
   11916             :  * 
   11917             :  * @cname('__pyx_memoryview_check')
   11918             :  * cdef inline bint memoryview_check(object o) noexcept:             # <<<<<<<<<<<<<<
   11919             :  *     return isinstance(o, memoryview)
   11920             :  * 
   11921             :  */
   11922             : 
   11923         141 : static CYTHON_INLINE int __pyx_memoryview_check(PyObject *__pyx_v_o) {
   11924         141 :   int __pyx_r;
   11925         141 :   int __pyx_t_1;
   11926             : 
   11927             :   /* "View.MemoryView":669
   11928             :  * @cname('__pyx_memoryview_check')
   11929             :  * cdef inline bint memoryview_check(object o) noexcept:
   11930             :  *     return isinstance(o, memoryview)             # <<<<<<<<<<<<<<
   11931             :  * 
   11932             :  * cdef tuple _unellipsify(object index, int ndim):
   11933             :  */
   11934         141 :   __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_o, __pyx_memoryview_type); 
   11935         141 :   __pyx_r = __pyx_t_1;
   11936         141 :   goto __pyx_L0;
   11937             : 
   11938             :   /* "View.MemoryView":668
   11939             :  * 
   11940             :  * @cname('__pyx_memoryview_check')
   11941             :  * cdef inline bint memoryview_check(object o) noexcept:             # <<<<<<<<<<<<<<
   11942             :  *     return isinstance(o, memoryview)
   11943             :  * 
   11944             :  */
   11945             : 
   11946             :   /* function exit code */
   11947         141 :   __pyx_L0:;
   11948         141 :   return __pyx_r;
   11949             : }
   11950             : 
   11951             : /* "View.MemoryView":671
   11952             :  *     return isinstance(o, memoryview)
   11953             :  * 
   11954             :  * cdef tuple _unellipsify(object index, int ndim):             # <<<<<<<<<<<<<<
   11955             :  *     """
   11956             :  *     Replace all ellipses with full slices and fill incomplete indices with
   11957             :  */
   11958             : 
   11959           0 : static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
   11960           0 :   Py_ssize_t __pyx_v_idx;
   11961           0 :   PyObject *__pyx_v_tup = NULL;
   11962           0 :   PyObject *__pyx_v_result = NULL;
   11963           0 :   int __pyx_v_have_slices;
   11964           0 :   int __pyx_v_seen_ellipsis;
   11965           0 :   PyObject *__pyx_v_item = NULL;
   11966           0 :   Py_ssize_t __pyx_v_nslices;
   11967           0 :   PyObject *__pyx_r = NULL;
   11968             :   __Pyx_RefNannyDeclarations
   11969           0 :   PyObject *__pyx_t_1 = NULL;
   11970           0 :   int __pyx_t_2;
   11971           0 :   PyObject *__pyx_t_3 = NULL;
   11972           0 :   Py_ssize_t __pyx_t_4;
   11973           0 :   Py_ssize_t __pyx_t_5;
   11974           0 :   Py_UCS4 __pyx_t_6;
   11975           0 :   PyObject *__pyx_t_7 = NULL;
   11976           0 :   int __pyx_lineno = 0;
   11977           0 :   const char *__pyx_filename = NULL;
   11978           0 :   int __pyx_clineno = 0;
   11979           0 :   __Pyx_RefNannySetupContext("_unellipsify", 1);
   11980             : 
   11981             :   /* "View.MemoryView":677
   11982             :  *     """
   11983             :  *     cdef Py_ssize_t idx
   11984             :  *     tup = <tuple>index if isinstance(index, tuple) else (index,)             # <<<<<<<<<<<<<<
   11985             :  * 
   11986             :  *     result = [slice(None)] * ndim
   11987             :  */
   11988           0 :   __pyx_t_2 = PyTuple_Check(__pyx_v_index); 
   11989           0 :   if (__pyx_t_2) {
   11990           0 :     __Pyx_INCREF(((PyObject*)__pyx_v_index));
   11991             :     __pyx_t_1 = __pyx_v_index;
   11992             :   } else {
   11993           0 :     __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 677, __pyx_L1_error)
   11994           0 :     __Pyx_GOTREF(__pyx_t_3);
   11995           0 :     __Pyx_INCREF(__pyx_v_index);
   11996           0 :     __Pyx_GIVEREF(__pyx_v_index);
   11997           0 :     if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index)) __PYX_ERR(1, 677, __pyx_L1_error);
   11998           0 :     __pyx_t_1 = __pyx_t_3;
   11999           0 :     __pyx_t_3 = 0;
   12000             :   }
   12001           0 :   __pyx_v_tup = ((PyObject*)__pyx_t_1);
   12002           0 :   __pyx_t_1 = 0;
   12003             : 
   12004             :   /* "View.MemoryView":679
   12005             :  *     tup = <tuple>index if isinstance(index, tuple) else (index,)
   12006             :  * 
   12007             :  *     result = [slice(None)] * ndim             # <<<<<<<<<<<<<<
   12008             :  *     have_slices = False
   12009             :  *     seen_ellipsis = False
   12010             :  */
   12011           0 :   __pyx_t_1 = PyList_New(1 * ((__pyx_v_ndim<0) ? 0:__pyx_v_ndim)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 679, __pyx_L1_error)
   12012             :   __Pyx_GOTREF(__pyx_t_1);
   12013             :   { Py_ssize_t __pyx_temp;
   12014           0 :     for (__pyx_temp=0; __pyx_temp < __pyx_v_ndim; __pyx_temp++) {
   12015           0 :       __Pyx_INCREF(__pyx_slice__5);
   12016           0 :       __Pyx_GIVEREF(__pyx_slice__5);
   12017           0 :       if (__Pyx_PyList_SET_ITEM(__pyx_t_1, __pyx_temp, __pyx_slice__5)) __PYX_ERR(1, 679, __pyx_L1_error);
   12018             :     }
   12019             :   }
   12020           0 :   __pyx_v_result = ((PyObject*)__pyx_t_1);
   12021           0 :   __pyx_t_1 = 0;
   12022             : 
   12023             :   /* "View.MemoryView":680
   12024             :  * 
   12025             :  *     result = [slice(None)] * ndim
   12026             :  *     have_slices = False             # <<<<<<<<<<<<<<
   12027             :  *     seen_ellipsis = False
   12028             :  *     idx = 0
   12029             :  */
   12030           0 :   __pyx_v_have_slices = 0;
   12031             : 
   12032             :   /* "View.MemoryView":681
   12033             :  *     result = [slice(None)] * ndim
   12034             :  *     have_slices = False
   12035             :  *     seen_ellipsis = False             # <<<<<<<<<<<<<<
   12036             :  *     idx = 0
   12037             :  *     for item in tup:
   12038             :  */
   12039           0 :   __pyx_v_seen_ellipsis = 0;
   12040             : 
   12041             :   /* "View.MemoryView":682
   12042             :  *     have_slices = False
   12043             :  *     seen_ellipsis = False
   12044             :  *     idx = 0             # <<<<<<<<<<<<<<
   12045             :  *     for item in tup:
   12046             :  *         if item is Ellipsis:
   12047             :  */
   12048           0 :   __pyx_v_idx = 0;
   12049             : 
   12050             :   /* "View.MemoryView":683
   12051             :  *     seen_ellipsis = False
   12052             :  *     idx = 0
   12053             :  *     for item in tup:             # <<<<<<<<<<<<<<
   12054             :  *         if item is Ellipsis:
   12055             :  *             if not seen_ellipsis:
   12056             :  */
   12057           0 :   if (unlikely(__pyx_v_tup == Py_None)) {
   12058           0 :     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
   12059           0 :     __PYX_ERR(1, 683, __pyx_L1_error)
   12060             :   }
   12061           0 :   __pyx_t_1 = __pyx_v_tup; __Pyx_INCREF(__pyx_t_1);
   12062             :   __pyx_t_4 = 0;
   12063           0 :   for (;;) {
   12064           0 :     {
   12065           0 :       Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
   12066             :       #if !CYTHON_ASSUME_SAFE_MACROS
   12067             :       if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 683, __pyx_L1_error)
   12068             :       #endif
   12069           0 :       if (__pyx_t_4 >= __pyx_temp) break;
   12070             :     }
   12071             :     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   12072           0 :     __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely((0 < 0))) __PYX_ERR(1, 683, __pyx_L1_error)
   12073             :     #else
   12074             :     __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 683, __pyx_L1_error)
   12075             :     __Pyx_GOTREF(__pyx_t_3);
   12076             :     #endif
   12077           0 :     __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_3);
   12078           0 :     __pyx_t_3 = 0;
   12079             : 
   12080             :     /* "View.MemoryView":684
   12081             :  *     idx = 0
   12082             :  *     for item in tup:
   12083             :  *         if item is Ellipsis:             # <<<<<<<<<<<<<<
   12084             :  *             if not seen_ellipsis:
   12085             :  *                 idx += ndim - len(tup)
   12086             :  */
   12087           0 :     __pyx_t_2 = (__pyx_v_item == __pyx_builtin_Ellipsis);
   12088           0 :     if (__pyx_t_2) {
   12089             : 
   12090             :       /* "View.MemoryView":685
   12091             :  *     for item in tup:
   12092             :  *         if item is Ellipsis:
   12093             :  *             if not seen_ellipsis:             # <<<<<<<<<<<<<<
   12094             :  *                 idx += ndim - len(tup)
   12095             :  *                 seen_ellipsis = True
   12096             :  */
   12097           0 :       __pyx_t_2 = (!__pyx_v_seen_ellipsis);
   12098           0 :       if (__pyx_t_2) {
   12099             : 
   12100             :         /* "View.MemoryView":686
   12101             :  *         if item is Ellipsis:
   12102             :  *             if not seen_ellipsis:
   12103             :  *                 idx += ndim - len(tup)             # <<<<<<<<<<<<<<
   12104             :  *                 seen_ellipsis = True
   12105             :  *             have_slices = True
   12106             :  */
   12107           0 :         if (unlikely(__pyx_v_tup == Py_None)) {
   12108             :           PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
   12109             :           __PYX_ERR(1, 686, __pyx_L1_error)
   12110             :         }
   12111           0 :         __pyx_t_5 = __Pyx_PyTuple_GET_SIZE(__pyx_v_tup); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 686, __pyx_L1_error)
   12112           0 :         __pyx_v_idx = (__pyx_v_idx + (__pyx_v_ndim - __pyx_t_5));
   12113             : 
   12114             :         /* "View.MemoryView":687
   12115             :  *             if not seen_ellipsis:
   12116             :  *                 idx += ndim - len(tup)
   12117             :  *                 seen_ellipsis = True             # <<<<<<<<<<<<<<
   12118             :  *             have_slices = True
   12119             :  *         else:
   12120             :  */
   12121           0 :         __pyx_v_seen_ellipsis = 1;
   12122             : 
   12123             :         /* "View.MemoryView":685
   12124             :  *     for item in tup:
   12125             :  *         if item is Ellipsis:
   12126             :  *             if not seen_ellipsis:             # <<<<<<<<<<<<<<
   12127             :  *                 idx += ndim - len(tup)
   12128             :  *                 seen_ellipsis = True
   12129             :  */
   12130             :       }
   12131             : 
   12132             :       /* "View.MemoryView":688
   12133             :  *                 idx += ndim - len(tup)
   12134             :  *                 seen_ellipsis = True
   12135             :  *             have_slices = True             # <<<<<<<<<<<<<<
   12136             :  *         else:
   12137             :  *             if isinstance(item, slice):
   12138             :  */
   12139           0 :       __pyx_v_have_slices = 1;
   12140             : 
   12141             :       /* "View.MemoryView":684
   12142             :  *     idx = 0
   12143             :  *     for item in tup:
   12144             :  *         if item is Ellipsis:             # <<<<<<<<<<<<<<
   12145             :  *             if not seen_ellipsis:
   12146             :  *                 idx += ndim - len(tup)
   12147             :  */
   12148           0 :       goto __pyx_L5;
   12149             :     }
   12150             : 
   12151             :     /* "View.MemoryView":690
   12152             :  *             have_slices = True
   12153             :  *         else:
   12154             :  *             if isinstance(item, slice):             # <<<<<<<<<<<<<<
   12155             :  *                 have_slices = True
   12156             :  *             elif not PyIndex_Check(item):
   12157             :  */
   12158             :     /*else*/ {
   12159           0 :       __pyx_t_2 = PySlice_Check(__pyx_v_item); 
   12160           0 :       if (__pyx_t_2) {
   12161             : 
   12162             :         /* "View.MemoryView":691
   12163             :  *         else:
   12164             :  *             if isinstance(item, slice):
   12165             :  *                 have_slices = True             # <<<<<<<<<<<<<<
   12166             :  *             elif not PyIndex_Check(item):
   12167             :  *                 raise TypeError, f"Cannot index with type '{type(item)}'"
   12168             :  */
   12169           0 :         __pyx_v_have_slices = 1;
   12170             : 
   12171             :         /* "View.MemoryView":690
   12172             :  *             have_slices = True
   12173             :  *         else:
   12174             :  *             if isinstance(item, slice):             # <<<<<<<<<<<<<<
   12175             :  *                 have_slices = True
   12176             :  *             elif not PyIndex_Check(item):
   12177             :  */
   12178           0 :         goto __pyx_L7;
   12179             :       }
   12180             : 
   12181             :       /* "View.MemoryView":692
   12182             :  *             if isinstance(item, slice):
   12183             :  *                 have_slices = True
   12184             :  *             elif not PyIndex_Check(item):             # <<<<<<<<<<<<<<
   12185             :  *                 raise TypeError, f"Cannot index with type '{type(item)}'"
   12186             :  *             result[idx] = item
   12187             :  */
   12188           0 :       __pyx_t_2 = (!(PyIndex_Check(__pyx_v_item) != 0));
   12189           0 :       if (unlikely(__pyx_t_2)) {
   12190             : 
   12191             :         /* "View.MemoryView":693
   12192             :  *                 have_slices = True
   12193             :  *             elif not PyIndex_Check(item):
   12194             :  *                 raise TypeError, f"Cannot index with type '{type(item)}'"             # <<<<<<<<<<<<<<
   12195             :  *             result[idx] = item
   12196             :  *         idx += 1
   12197             :  */
   12198           0 :         __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 693, __pyx_L1_error)
   12199           0 :         __Pyx_GOTREF(__pyx_t_3);
   12200           0 :         __pyx_t_5 = 0;
   12201           0 :         __pyx_t_6 = 127;
   12202           0 :         __Pyx_INCREF(__pyx_kp_u_Cannot_index_with_type);
   12203           0 :         __pyx_t_5 += 24;
   12204           0 :         __Pyx_GIVEREF(__pyx_kp_u_Cannot_index_with_type);
   12205           0 :         PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Cannot_index_with_type);
   12206           0 :         __pyx_t_7 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_item)), __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 693, __pyx_L1_error)
   12207           0 :         __Pyx_GOTREF(__pyx_t_7);
   12208           0 :         __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_6;
   12209           0 :         __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
   12210           0 :         __Pyx_GIVEREF(__pyx_t_7);
   12211           0 :         PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_7);
   12212           0 :         __pyx_t_7 = 0;
   12213           0 :         __Pyx_INCREF(__pyx_kp_u__6);
   12214           0 :         __pyx_t_5 += 1;
   12215           0 :         __Pyx_GIVEREF(__pyx_kp_u__6);
   12216           0 :         PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__6);
   12217           0 :         __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 693, __pyx_L1_error)
   12218           0 :         __Pyx_GOTREF(__pyx_t_7);
   12219           0 :         __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   12220           0 :         __Pyx_Raise(__pyx_builtin_TypeError, __pyx_t_7, 0, 0);
   12221           0 :         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   12222           0 :         __PYX_ERR(1, 693, __pyx_L1_error)
   12223             : 
   12224             :         /* "View.MemoryView":692
   12225             :  *             if isinstance(item, slice):
   12226             :  *                 have_slices = True
   12227             :  *             elif not PyIndex_Check(item):             # <<<<<<<<<<<<<<
   12228             :  *                 raise TypeError, f"Cannot index with type '{type(item)}'"
   12229             :  *             result[idx] = item
   12230             :  */
   12231             :       }
   12232           0 :       __pyx_L7:;
   12233             : 
   12234             :       /* "View.MemoryView":694
   12235             :  *             elif not PyIndex_Check(item):
   12236             :  *                 raise TypeError, f"Cannot index with type '{type(item)}'"
   12237             :  *             result[idx] = item             # <<<<<<<<<<<<<<
   12238             :  *         idx += 1
   12239             :  * 
   12240             :  */
   12241           0 :       if (unlikely((__Pyx_SetItemInt(__pyx_v_result, __pyx_v_idx, __pyx_v_item, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1) < 0))) __PYX_ERR(1, 694, __pyx_L1_error)
   12242             :     }
   12243           0 :     __pyx_L5:;
   12244             : 
   12245             :     /* "View.MemoryView":695
   12246             :  *                 raise TypeError, f"Cannot index with type '{type(item)}'"
   12247             :  *             result[idx] = item
   12248             :  *         idx += 1             # <<<<<<<<<<<<<<
   12249             :  * 
   12250             :  *     nslices = ndim - idx
   12251             :  */
   12252           0 :     __pyx_v_idx = (__pyx_v_idx + 1);
   12253             : 
   12254             :     /* "View.MemoryView":683
   12255             :  *     seen_ellipsis = False
   12256             :  *     idx = 0
   12257             :  *     for item in tup:             # <<<<<<<<<<<<<<
   12258             :  *         if item is Ellipsis:
   12259             :  *             if not seen_ellipsis:
   12260             :  */
   12261             :   }
   12262           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   12263             : 
   12264             :   /* "View.MemoryView":697
   12265             :  *         idx += 1
   12266             :  * 
   12267             :  *     nslices = ndim - idx             # <<<<<<<<<<<<<<
   12268             :  *     return have_slices or nslices, tuple(result)
   12269             :  * 
   12270             :  */
   12271           0 :   __pyx_v_nslices = (__pyx_v_ndim - __pyx_v_idx);
   12272             : 
   12273             :   /* "View.MemoryView":698
   12274             :  * 
   12275             :  *     nslices = ndim - idx
   12276             :  *     return have_slices or nslices, tuple(result)             # <<<<<<<<<<<<<<
   12277             :  * 
   12278             :  * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
   12279             :  */
   12280           0 :   __Pyx_XDECREF(__pyx_r);
   12281           0 :   if (!__pyx_v_have_slices) {
   12282           0 :   } else {
   12283           0 :     __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 698, __pyx_L1_error)
   12284           0 :     __Pyx_GOTREF(__pyx_t_7);
   12285           0 :     __pyx_t_1 = __pyx_t_7;
   12286           0 :     __pyx_t_7 = 0;
   12287           0 :     goto __pyx_L9_bool_binop_done;
   12288             :   }
   12289           0 :   __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_nslices); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 698, __pyx_L1_error)
   12290             :   __Pyx_GOTREF(__pyx_t_7);
   12291             :   __pyx_t_1 = __pyx_t_7;
   12292           0 :   __pyx_t_7 = 0;
   12293           0 :   __pyx_L9_bool_binop_done:;
   12294           0 :   __pyx_t_7 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 698, __pyx_L1_error)
   12295           0 :   __Pyx_GOTREF(__pyx_t_7);
   12296           0 :   __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 698, __pyx_L1_error)
   12297           0 :   __Pyx_GOTREF(__pyx_t_3);
   12298           0 :   __Pyx_GIVEREF(__pyx_t_1);
   12299           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(1, 698, __pyx_L1_error);
   12300           0 :   __Pyx_GIVEREF(__pyx_t_7);
   12301           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_7)) __PYX_ERR(1, 698, __pyx_L1_error);
   12302           0 :   __pyx_t_1 = 0;
   12303           0 :   __pyx_t_7 = 0;
   12304           0 :   __pyx_r = ((PyObject*)__pyx_t_3);
   12305           0 :   __pyx_t_3 = 0;
   12306           0 :   goto __pyx_L0;
   12307             : 
   12308             :   /* "View.MemoryView":671
   12309             :  *     return isinstance(o, memoryview)
   12310             :  * 
   12311             :  * cdef tuple _unellipsify(object index, int ndim):             # <<<<<<<<<<<<<<
   12312             :  *     """
   12313             :  *     Replace all ellipses with full slices and fill incomplete indices with
   12314             :  */
   12315             : 
   12316             :   /* function exit code */
   12317           0 :   __pyx_L1_error:;
   12318           0 :   __Pyx_XDECREF(__pyx_t_1);
   12319           0 :   __Pyx_XDECREF(__pyx_t_3);
   12320           0 :   __Pyx_XDECREF(__pyx_t_7);
   12321           0 :   __Pyx_AddTraceback("View.MemoryView._unellipsify", __pyx_clineno, __pyx_lineno, __pyx_filename);
   12322           0 :   __pyx_r = 0;
   12323           0 :   __pyx_L0:;
   12324           0 :   __Pyx_XDECREF(__pyx_v_tup);
   12325           0 :   __Pyx_XDECREF(__pyx_v_result);
   12326           0 :   __Pyx_XDECREF(__pyx_v_item);
   12327           0 :   __Pyx_XGIVEREF(__pyx_r);
   12328           0 :   __Pyx_RefNannyFinishContext();
   12329           0 :   return __pyx_r;
   12330             : }
   12331             : 
   12332             : /* "View.MemoryView":700
   12333             :  *     return have_slices or nslices, tuple(result)
   12334             :  * 
   12335             :  * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:             # <<<<<<<<<<<<<<
   12336             :  *     for suboffset in suboffsets[:ndim]:
   12337             :  *         if suboffset >= 0:
   12338             :  */
   12339             : 
   12340           0 : static int assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __pyx_v_ndim) {
   12341           0 :   Py_ssize_t __pyx_v_suboffset;
   12342           0 :   int __pyx_r;
   12343           0 :   Py_ssize_t *__pyx_t_1;
   12344           0 :   Py_ssize_t *__pyx_t_2;
   12345           0 :   Py_ssize_t *__pyx_t_3;
   12346           0 :   int __pyx_t_4;
   12347           0 :   int __pyx_lineno = 0;
   12348           0 :   const char *__pyx_filename = NULL;
   12349           0 :   int __pyx_clineno = 0;
   12350             : 
   12351             :   /* "View.MemoryView":701
   12352             :  * 
   12353             :  * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
   12354             :  *     for suboffset in suboffsets[:ndim]:             # <<<<<<<<<<<<<<
   12355             :  *         if suboffset >= 0:
   12356             :  *             raise ValueError, "Indirect dimensions not supported"
   12357             :  */
   12358           0 :   __pyx_t_2 = (__pyx_v_suboffsets + __pyx_v_ndim);
   12359           0 :   for (__pyx_t_3 = __pyx_v_suboffsets; __pyx_t_3 < __pyx_t_2; __pyx_t_3++) {
   12360           0 :     __pyx_t_1 = __pyx_t_3;
   12361           0 :     __pyx_v_suboffset = (__pyx_t_1[0]);
   12362             : 
   12363             :     /* "View.MemoryView":702
   12364             :  * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
   12365             :  *     for suboffset in suboffsets[:ndim]:
   12366             :  *         if suboffset >= 0:             # <<<<<<<<<<<<<<
   12367             :  *             raise ValueError, "Indirect dimensions not supported"
   12368             :  *     return 0  # return type just used as an error flag
   12369             :  */
   12370           0 :     __pyx_t_4 = (__pyx_v_suboffset >= 0);
   12371           0 :     if (unlikely(__pyx_t_4)) {
   12372             : 
   12373             :       /* "View.MemoryView":703
   12374             :  *     for suboffset in suboffsets[:ndim]:
   12375             :  *         if suboffset >= 0:
   12376             :  *             raise ValueError, "Indirect dimensions not supported"             # <<<<<<<<<<<<<<
   12377             :  *     return 0  # return type just used as an error flag
   12378             :  * 
   12379             :  */
   12380           0 :       __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Indirect_dimensions_not_supporte, 0, 0);
   12381           0 :       __PYX_ERR(1, 703, __pyx_L1_error)
   12382             : 
   12383             :       /* "View.MemoryView":702
   12384             :  * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:
   12385             :  *     for suboffset in suboffsets[:ndim]:
   12386             :  *         if suboffset >= 0:             # <<<<<<<<<<<<<<
   12387             :  *             raise ValueError, "Indirect dimensions not supported"
   12388             :  *     return 0  # return type just used as an error flag
   12389             :  */
   12390             :     }
   12391             :   }
   12392             : 
   12393             :   /* "View.MemoryView":704
   12394             :  *         if suboffset >= 0:
   12395             :  *             raise ValueError, "Indirect dimensions not supported"
   12396             :  *     return 0  # return type just used as an error flag             # <<<<<<<<<<<<<<
   12397             :  * 
   12398             :  * 
   12399             :  */
   12400           0 :   __pyx_r = 0;
   12401           0 :   goto __pyx_L0;
   12402             : 
   12403             :   /* "View.MemoryView":700
   12404             :  *     return have_slices or nslices, tuple(result)
   12405             :  * 
   12406             :  * cdef int assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim) except -1:             # <<<<<<<<<<<<<<
   12407             :  *     for suboffset in suboffsets[:ndim]:
   12408             :  *         if suboffset >= 0:
   12409             :  */
   12410             : 
   12411             :   /* function exit code */
   12412           0 :   __pyx_L1_error:;
   12413           0 :   __Pyx_AddTraceback("View.MemoryView.assert_direct_dimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
   12414           0 :   __pyx_r = -1;
   12415           0 :   __pyx_L0:;
   12416           0 :   return __pyx_r;
   12417             : }
   12418             : 
   12419             : /* "View.MemoryView":711
   12420             :  * 
   12421             :  * @cname('__pyx_memview_slice')
   12422             :  * cdef memoryview memview_slice(memoryview memview, object indices):             # <<<<<<<<<<<<<<
   12423             :  *     cdef int new_ndim = 0, suboffset_dim = -1, dim
   12424             :  *     cdef bint negative_step
   12425             :  */
   12426             : 
   12427           0 : static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *__pyx_v_memview, PyObject *__pyx_v_indices) {
   12428           0 :   int __pyx_v_new_ndim;
   12429           0 :   int __pyx_v_suboffset_dim;
   12430           0 :   int __pyx_v_dim;
   12431           0 :   __Pyx_memviewslice __pyx_v_src;
   12432           0 :   __Pyx_memviewslice __pyx_v_dst;
   12433           0 :   __Pyx_memviewslice *__pyx_v_p_src;
   12434           0 :   struct __pyx_memoryviewslice_obj *__pyx_v_memviewsliceobj = 0;
   12435           0 :   __Pyx_memviewslice *__pyx_v_p_dst;
   12436           0 :   int *__pyx_v_p_suboffset_dim;
   12437           0 :   Py_ssize_t __pyx_v_start;
   12438           0 :   Py_ssize_t __pyx_v_stop;
   12439           0 :   Py_ssize_t __pyx_v_step;
   12440           0 :   Py_ssize_t __pyx_v_cindex;
   12441           0 :   int __pyx_v_have_start;
   12442           0 :   int __pyx_v_have_stop;
   12443           0 :   int __pyx_v_have_step;
   12444           0 :   PyObject *__pyx_v_index = NULL;
   12445           0 :   struct __pyx_memoryview_obj *__pyx_r = NULL;
   12446             :   __Pyx_RefNannyDeclarations
   12447           0 :   int __pyx_t_1;
   12448           0 :   PyObject *__pyx_t_2 = NULL;
   12449           0 :   struct __pyx_memoryview_obj *__pyx_t_3;
   12450           0 :   char *__pyx_t_4;
   12451           0 :   int __pyx_t_5;
   12452           0 :   Py_ssize_t __pyx_t_6;
   12453           0 :   PyObject *(*__pyx_t_7)(PyObject *);
   12454           0 :   PyObject *__pyx_t_8 = NULL;
   12455           0 :   Py_ssize_t __pyx_t_9;
   12456           0 :   int __pyx_t_10;
   12457           0 :   Py_ssize_t __pyx_t_11;
   12458           0 :   int __pyx_lineno = 0;
   12459           0 :   const char *__pyx_filename = NULL;
   12460           0 :   int __pyx_clineno = 0;
   12461           0 :   __Pyx_RefNannySetupContext("memview_slice", 1);
   12462             : 
   12463             :   /* "View.MemoryView":712
   12464             :  * @cname('__pyx_memview_slice')
   12465             :  * cdef memoryview memview_slice(memoryview memview, object indices):
   12466             :  *     cdef int new_ndim = 0, suboffset_dim = -1, dim             # <<<<<<<<<<<<<<
   12467             :  *     cdef bint negative_step
   12468             :  *     cdef __Pyx_memviewslice src, dst
   12469             :  */
   12470           0 :   __pyx_v_new_ndim = 0;
   12471           0 :   __pyx_v_suboffset_dim = -1;
   12472             : 
   12473             :   /* "View.MemoryView":719
   12474             :  * 
   12475             :  * 
   12476             :  *     memset(&dst, 0, sizeof(dst))             # <<<<<<<<<<<<<<
   12477             :  * 
   12478             :  *     cdef _memoryviewslice memviewsliceobj
   12479             :  */
   12480           0 :   (void)(memset((&__pyx_v_dst), 0, (sizeof(__pyx_v_dst))));
   12481             : 
   12482             :   /* "View.MemoryView":723
   12483             :  *     cdef _memoryviewslice memviewsliceobj
   12484             :  * 
   12485             :  *     assert memview.view.ndim > 0             # <<<<<<<<<<<<<<
   12486             :  * 
   12487             :  *     if isinstance(memview, _memoryviewslice):
   12488             :  */
   12489             :   #ifndef CYTHON_WITHOUT_ASSERTIONS
   12490           0 :   if (unlikely(__pyx_assertions_enabled())) {
   12491           0 :     __pyx_t_1 = (__pyx_v_memview->view.ndim > 0);
   12492           0 :     if (unlikely(!__pyx_t_1)) {
   12493           0 :       __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
   12494           0 :       __PYX_ERR(1, 723, __pyx_L1_error)
   12495             :     }
   12496             :   }
   12497             :   #else
   12498             :   if ((1)); else __PYX_ERR(1, 723, __pyx_L1_error)
   12499             :   #endif
   12500             : 
   12501             :   /* "View.MemoryView":725
   12502             :  *     assert memview.view.ndim > 0
   12503             :  * 
   12504             :  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
   12505             :  *         memviewsliceobj = memview
   12506             :  *         p_src = &memviewsliceobj.from_slice
   12507             :  */
   12508           0 :   __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); 
   12509           0 :   if (__pyx_t_1) {
   12510             : 
   12511             :     /* "View.MemoryView":726
   12512             :  * 
   12513             :  *     if isinstance(memview, _memoryviewslice):
   12514             :  *         memviewsliceobj = memview             # <<<<<<<<<<<<<<
   12515             :  *         p_src = &memviewsliceobj.from_slice
   12516             :  *     else:
   12517             :  */
   12518           0 :     if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(1, 726, __pyx_L1_error)
   12519           0 :     __pyx_t_2 = ((PyObject *)__pyx_v_memview);
   12520           0 :     __Pyx_INCREF(__pyx_t_2);
   12521           0 :     __pyx_v_memviewsliceobj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
   12522           0 :     __pyx_t_2 = 0;
   12523             : 
   12524             :     /* "View.MemoryView":727
   12525             :  *     if isinstance(memview, _memoryviewslice):
   12526             :  *         memviewsliceobj = memview
   12527             :  *         p_src = &memviewsliceobj.from_slice             # <<<<<<<<<<<<<<
   12528             :  *     else:
   12529             :  *         slice_copy(memview, &src)
   12530             :  */
   12531           0 :     __pyx_v_p_src = (&__pyx_v_memviewsliceobj->from_slice);
   12532             : 
   12533             :     /* "View.MemoryView":725
   12534             :  *     assert memview.view.ndim > 0
   12535             :  * 
   12536             :  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
   12537             :  *         memviewsliceobj = memview
   12538             :  *         p_src = &memviewsliceobj.from_slice
   12539             :  */
   12540           0 :     goto __pyx_L3;
   12541             :   }
   12542             : 
   12543             :   /* "View.MemoryView":729
   12544             :  *         p_src = &memviewsliceobj.from_slice
   12545             :  *     else:
   12546             :  *         slice_copy(memview, &src)             # <<<<<<<<<<<<<<
   12547             :  *         p_src = &src
   12548             :  * 
   12549             :  */
   12550             :   /*else*/ {
   12551           0 :     __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_src));
   12552             : 
   12553             :     /* "View.MemoryView":730
   12554             :  *     else:
   12555             :  *         slice_copy(memview, &src)
   12556             :  *         p_src = &src             # <<<<<<<<<<<<<<
   12557             :  * 
   12558             :  * 
   12559             :  */
   12560           0 :     __pyx_v_p_src = (&__pyx_v_src);
   12561             :   }
   12562           0 :   __pyx_L3:;
   12563             : 
   12564             :   /* "View.MemoryView":736
   12565             :  * 
   12566             :  * 
   12567             :  *     dst.memview = p_src.memview             # <<<<<<<<<<<<<<
   12568             :  *     dst.data = p_src.data
   12569             :  * 
   12570             :  */
   12571           0 :   __pyx_t_3 = __pyx_v_p_src->memview;
   12572           0 :   __pyx_v_dst.memview = __pyx_t_3;
   12573             : 
   12574             :   /* "View.MemoryView":737
   12575             :  * 
   12576             :  *     dst.memview = p_src.memview
   12577             :  *     dst.data = p_src.data             # <<<<<<<<<<<<<<
   12578             :  * 
   12579             :  * 
   12580             :  */
   12581           0 :   __pyx_t_4 = __pyx_v_p_src->data;
   12582           0 :   __pyx_v_dst.data = __pyx_t_4;
   12583             : 
   12584             :   /* "View.MemoryView":742
   12585             :  * 
   12586             :  * 
   12587             :  *     cdef __Pyx_memviewslice *p_dst = &dst             # <<<<<<<<<<<<<<
   12588             :  *     cdef int *p_suboffset_dim = &suboffset_dim
   12589             :  *     cdef Py_ssize_t start, stop, step, cindex
   12590             :  */
   12591           0 :   __pyx_v_p_dst = (&__pyx_v_dst);
   12592             : 
   12593             :   /* "View.MemoryView":743
   12594             :  * 
   12595             :  *     cdef __Pyx_memviewslice *p_dst = &dst
   12596             :  *     cdef int *p_suboffset_dim = &suboffset_dim             # <<<<<<<<<<<<<<
   12597             :  *     cdef Py_ssize_t start, stop, step, cindex
   12598             :  *     cdef bint have_start, have_stop, have_step
   12599             :  */
   12600           0 :   __pyx_v_p_suboffset_dim = (&__pyx_v_suboffset_dim);
   12601             : 
   12602             :   /* "View.MemoryView":747
   12603             :  *     cdef bint have_start, have_stop, have_step
   12604             :  * 
   12605             :  *     for dim, index in enumerate(indices):             # <<<<<<<<<<<<<<
   12606             :  *         if PyIndex_Check(index):
   12607             :  *             cindex = index
   12608             :  */
   12609           0 :   __pyx_t_5 = 0;
   12610           0 :   if (likely(PyList_CheckExact(__pyx_v_indices)) || PyTuple_CheckExact(__pyx_v_indices)) {
   12611           0 :     __pyx_t_2 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_2);
   12612           0 :     __pyx_t_6 = 0;
   12613           0 :     __pyx_t_7 = NULL;
   12614             :   } else {
   12615           0 :     __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 747, __pyx_L1_error)
   12616           0 :     __Pyx_GOTREF(__pyx_t_2);
   12617           0 :     __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 747, __pyx_L1_error)
   12618             :   }
   12619           0 :   for (;;) {
   12620           0 :     if (likely(!__pyx_t_7)) {
   12621           0 :       if (likely(PyList_CheckExact(__pyx_t_2))) {
   12622             :         {
   12623           0 :           Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
   12624             :           #if !CYTHON_ASSUME_SAFE_MACROS
   12625             :           if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 747, __pyx_L1_error)
   12626             :           #endif
   12627           0 :           if (__pyx_t_6 >= __pyx_temp) break;
   12628             :         }
   12629             :         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   12630           0 :         __pyx_t_8 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(1, 747, __pyx_L1_error)
   12631             :         #else
   12632             :         __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 747, __pyx_L1_error)
   12633             :         __Pyx_GOTREF(__pyx_t_8);
   12634             :         #endif
   12635             :       } else {
   12636             :         {
   12637           0 :           Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
   12638             :           #if !CYTHON_ASSUME_SAFE_MACROS
   12639             :           if (unlikely((__pyx_temp < 0))) __PYX_ERR(1, 747, __pyx_L1_error)
   12640             :           #endif
   12641           0 :           if (__pyx_t_6 >= __pyx_temp) break;
   12642             :         }
   12643             :         #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   12644           0 :         __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely((0 < 0))) __PYX_ERR(1, 747, __pyx_L1_error)
   12645             :         #else
   12646             :         __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 747, __pyx_L1_error)
   12647             :         __Pyx_GOTREF(__pyx_t_8);
   12648             :         #endif
   12649             :       }
   12650             :     } else {
   12651           0 :       __pyx_t_8 = __pyx_t_7(__pyx_t_2);
   12652           0 :       if (unlikely(!__pyx_t_8)) {
   12653           0 :         PyObject* exc_type = PyErr_Occurred();
   12654           0 :         if (exc_type) {
   12655           0 :           if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
   12656           0 :           else __PYX_ERR(1, 747, __pyx_L1_error)
   12657             :         }
   12658             :         break;
   12659             :       }
   12660           0 :       __Pyx_GOTREF(__pyx_t_8);
   12661             :     }
   12662           0 :     __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_8);
   12663           0 :     __pyx_t_8 = 0;
   12664           0 :     __pyx_v_dim = __pyx_t_5;
   12665           0 :     __pyx_t_5 = (__pyx_t_5 + 1);
   12666             : 
   12667             :     /* "View.MemoryView":748
   12668             :  * 
   12669             :  *     for dim, index in enumerate(indices):
   12670             :  *         if PyIndex_Check(index):             # <<<<<<<<<<<<<<
   12671             :  *             cindex = index
   12672             :  *             slice_memviewslice(
   12673             :  */
   12674           0 :     __pyx_t_1 = (PyIndex_Check(__pyx_v_index) != 0);
   12675           0 :     if (__pyx_t_1) {
   12676             : 
   12677             :       /* "View.MemoryView":749
   12678             :  *     for dim, index in enumerate(indices):
   12679             :  *         if PyIndex_Check(index):
   12680             :  *             cindex = index             # <<<<<<<<<<<<<<
   12681             :  *             slice_memviewslice(
   12682             :  *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
   12683             :  */
   12684           0 :       __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 749, __pyx_L1_error)
   12685           0 :       __pyx_v_cindex = __pyx_t_9;
   12686             : 
   12687             :       /* "View.MemoryView":750
   12688             :  *         if PyIndex_Check(index):
   12689             :  *             cindex = index
   12690             :  *             slice_memviewslice(             # <<<<<<<<<<<<<<
   12691             :  *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
   12692             :  *                 dim, new_ndim, p_suboffset_dim,
   12693             :  */
   12694           0 :       __pyx_t_10 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_cindex, 0, 0, 0, 0, 0, 0); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(1, 750, __pyx_L1_error)
   12695             : 
   12696             :       /* "View.MemoryView":748
   12697             :  * 
   12698             :  *     for dim, index in enumerate(indices):
   12699             :  *         if PyIndex_Check(index):             # <<<<<<<<<<<<<<
   12700             :  *             cindex = index
   12701             :  *             slice_memviewslice(
   12702             :  */
   12703           0 :       goto __pyx_L6;
   12704             :     }
   12705             : 
   12706             :     /* "View.MemoryView":756
   12707             :  *                 0, 0, 0, # have_{start,stop,step}
   12708             :  *                 False)
   12709             :  *         elif index is None:             # <<<<<<<<<<<<<<
   12710             :  *             p_dst.shape[new_ndim] = 1
   12711             :  *             p_dst.strides[new_ndim] = 0
   12712             :  */
   12713           0 :     __pyx_t_1 = (__pyx_v_index == Py_None);
   12714           0 :     if (__pyx_t_1) {
   12715             : 
   12716             :       /* "View.MemoryView":757
   12717             :  *                 False)
   12718             :  *         elif index is None:
   12719             :  *             p_dst.shape[new_ndim] = 1             # <<<<<<<<<<<<<<
   12720             :  *             p_dst.strides[new_ndim] = 0
   12721             :  *             p_dst.suboffsets[new_ndim] = -1
   12722             :  */
   12723           0 :       (__pyx_v_p_dst->shape[__pyx_v_new_ndim]) = 1;
   12724             : 
   12725             :       /* "View.MemoryView":758
   12726             :  *         elif index is None:
   12727             :  *             p_dst.shape[new_ndim] = 1
   12728             :  *             p_dst.strides[new_ndim] = 0             # <<<<<<<<<<<<<<
   12729             :  *             p_dst.suboffsets[new_ndim] = -1
   12730             :  *             new_ndim += 1
   12731             :  */
   12732           0 :       (__pyx_v_p_dst->strides[__pyx_v_new_ndim]) = 0;
   12733             : 
   12734             :       /* "View.MemoryView":759
   12735             :  *             p_dst.shape[new_ndim] = 1
   12736             :  *             p_dst.strides[new_ndim] = 0
   12737             :  *             p_dst.suboffsets[new_ndim] = -1             # <<<<<<<<<<<<<<
   12738             :  *             new_ndim += 1
   12739             :  *         else:
   12740             :  */
   12741           0 :       (__pyx_v_p_dst->suboffsets[__pyx_v_new_ndim]) = -1L;
   12742             : 
   12743             :       /* "View.MemoryView":760
   12744             :  *             p_dst.strides[new_ndim] = 0
   12745             :  *             p_dst.suboffsets[new_ndim] = -1
   12746             :  *             new_ndim += 1             # <<<<<<<<<<<<<<
   12747             :  *         else:
   12748             :  *             start = index.start or 0
   12749             :  */
   12750           0 :       __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
   12751             : 
   12752             :       /* "View.MemoryView":756
   12753             :  *                 0, 0, 0, # have_{start,stop,step}
   12754             :  *                 False)
   12755             :  *         elif index is None:             # <<<<<<<<<<<<<<
   12756             :  *             p_dst.shape[new_ndim] = 1
   12757             :  *             p_dst.strides[new_ndim] = 0
   12758             :  */
   12759           0 :       goto __pyx_L6;
   12760             :     }
   12761             : 
   12762             :     /* "View.MemoryView":762
   12763             :  *             new_ndim += 1
   12764             :  *         else:
   12765             :  *             start = index.start or 0             # <<<<<<<<<<<<<<
   12766             :  *             stop = index.stop or 0
   12767             :  *             step = index.step or 0
   12768             :  */
   12769             :     /*else*/ {
   12770           0 :       __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 762, __pyx_L1_error)
   12771           0 :       __Pyx_GOTREF(__pyx_t_8);
   12772           0 :       __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 762, __pyx_L1_error)
   12773           0 :       if (!__pyx_t_1) {
   12774           0 :         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   12775             :       } else {
   12776           0 :         __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 762, __pyx_L1_error)
   12777           0 :         __pyx_t_9 = __pyx_t_11;
   12778           0 :         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   12779           0 :         goto __pyx_L7_bool_binop_done;
   12780             :       }
   12781             :       __pyx_t_9 = 0;
   12782           0 :       __pyx_L7_bool_binop_done:;
   12783           0 :       __pyx_v_start = __pyx_t_9;
   12784             : 
   12785             :       /* "View.MemoryView":763
   12786             :  *         else:
   12787             :  *             start = index.start or 0
   12788             :  *             stop = index.stop or 0             # <<<<<<<<<<<<<<
   12789             :  *             step = index.step or 0
   12790             :  * 
   12791             :  */
   12792           0 :       __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 763, __pyx_L1_error)
   12793           0 :       __Pyx_GOTREF(__pyx_t_8);
   12794           0 :       __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 763, __pyx_L1_error)
   12795           0 :       if (!__pyx_t_1) {
   12796           0 :         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   12797             :       } else {
   12798           0 :         __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 763, __pyx_L1_error)
   12799           0 :         __pyx_t_9 = __pyx_t_11;
   12800           0 :         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   12801           0 :         goto __pyx_L9_bool_binop_done;
   12802             :       }
   12803             :       __pyx_t_9 = 0;
   12804           0 :       __pyx_L9_bool_binop_done:;
   12805           0 :       __pyx_v_stop = __pyx_t_9;
   12806             : 
   12807             :       /* "View.MemoryView":764
   12808             :  *             start = index.start or 0
   12809             :  *             stop = index.stop or 0
   12810             :  *             step = index.step or 0             # <<<<<<<<<<<<<<
   12811             :  * 
   12812             :  *             have_start = index.start is not None
   12813             :  */
   12814           0 :       __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 764, __pyx_L1_error)
   12815           0 :       __Pyx_GOTREF(__pyx_t_8);
   12816           0 :       __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(1, 764, __pyx_L1_error)
   12817           0 :       if (!__pyx_t_1) {
   12818           0 :         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   12819             :       } else {
   12820           0 :         __pyx_t_11 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_11 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 764, __pyx_L1_error)
   12821           0 :         __pyx_t_9 = __pyx_t_11;
   12822           0 :         __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   12823           0 :         goto __pyx_L11_bool_binop_done;
   12824             :       }
   12825             :       __pyx_t_9 = 0;
   12826           0 :       __pyx_L11_bool_binop_done:;
   12827           0 :       __pyx_v_step = __pyx_t_9;
   12828             : 
   12829             :       /* "View.MemoryView":766
   12830             :  *             step = index.step or 0
   12831             :  * 
   12832             :  *             have_start = index.start is not None             # <<<<<<<<<<<<<<
   12833             :  *             have_stop = index.stop is not None
   12834             :  *             have_step = index.step is not None
   12835             :  */
   12836           0 :       __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 766, __pyx_L1_error)
   12837           0 :       __Pyx_GOTREF(__pyx_t_8);
   12838           0 :       __pyx_t_1 = (__pyx_t_8 != Py_None);
   12839           0 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   12840           0 :       __pyx_v_have_start = __pyx_t_1;
   12841             : 
   12842             :       /* "View.MemoryView":767
   12843             :  * 
   12844             :  *             have_start = index.start is not None
   12845             :  *             have_stop = index.stop is not None             # <<<<<<<<<<<<<<
   12846             :  *             have_step = index.step is not None
   12847             :  * 
   12848             :  */
   12849           0 :       __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 767, __pyx_L1_error)
   12850           0 :       __Pyx_GOTREF(__pyx_t_8);
   12851           0 :       __pyx_t_1 = (__pyx_t_8 != Py_None);
   12852           0 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   12853           0 :       __pyx_v_have_stop = __pyx_t_1;
   12854             : 
   12855             :       /* "View.MemoryView":768
   12856             :  *             have_start = index.start is not None
   12857             :  *             have_stop = index.stop is not None
   12858             :  *             have_step = index.step is not None             # <<<<<<<<<<<<<<
   12859             :  * 
   12860             :  *             slice_memviewslice(
   12861             :  */
   12862           0 :       __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 768, __pyx_L1_error)
   12863           0 :       __Pyx_GOTREF(__pyx_t_8);
   12864           0 :       __pyx_t_1 = (__pyx_t_8 != Py_None);
   12865           0 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   12866           0 :       __pyx_v_have_step = __pyx_t_1;
   12867             : 
   12868             :       /* "View.MemoryView":770
   12869             :  *             have_step = index.step is not None
   12870             :  * 
   12871             :  *             slice_memviewslice(             # <<<<<<<<<<<<<<
   12872             :  *                 p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
   12873             :  *                 dim, new_ndim, p_suboffset_dim,
   12874             :  */
   12875           0 :       __pyx_t_10 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_have_start, __pyx_v_have_stop, __pyx_v_have_step, 1); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(1, 770, __pyx_L1_error)
   12876             : 
   12877             :       /* "View.MemoryView":776
   12878             :  *                 have_start, have_stop, have_step,
   12879             :  *                 True)
   12880             :  *             new_ndim += 1             # <<<<<<<<<<<<<<
   12881             :  * 
   12882             :  *     if isinstance(memview, _memoryviewslice):
   12883             :  */
   12884           0 :       __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
   12885             :     }
   12886           0 :     __pyx_L6:;
   12887             : 
   12888             :     /* "View.MemoryView":747
   12889             :  *     cdef bint have_start, have_stop, have_step
   12890             :  * 
   12891             :  *     for dim, index in enumerate(indices):             # <<<<<<<<<<<<<<
   12892             :  *         if PyIndex_Check(index):
   12893             :  *             cindex = index
   12894             :  */
   12895             :   }
   12896           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   12897             : 
   12898             :   /* "View.MemoryView":778
   12899             :  *             new_ndim += 1
   12900             :  * 
   12901             :  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
   12902             :  *         return memoryview_fromslice(dst, new_ndim,
   12903             :  *                                     memviewsliceobj.to_object_func,
   12904             :  */
   12905           0 :   __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); 
   12906           0 :   if (__pyx_t_1) {
   12907             : 
   12908             :     /* "View.MemoryView":779
   12909             :  * 
   12910             :  *     if isinstance(memview, _memoryviewslice):
   12911             :  *         return memoryview_fromslice(dst, new_ndim,             # <<<<<<<<<<<<<<
   12912             :  *                                     memviewsliceobj.to_object_func,
   12913             :  *                                     memviewsliceobj.to_dtype_func,
   12914             :  */
   12915           0 :     __Pyx_XDECREF((PyObject *)__pyx_r);
   12916             : 
   12917             :     /* "View.MemoryView":780
   12918             :  *     if isinstance(memview, _memoryviewslice):
   12919             :  *         return memoryview_fromslice(dst, new_ndim,
   12920             :  *                                     memviewsliceobj.to_object_func,             # <<<<<<<<<<<<<<
   12921             :  *                                     memviewsliceobj.to_dtype_func,
   12922             :  *                                     memview.dtype_is_object)
   12923             :  */
   12924           0 :     if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 780, __pyx_L1_error) }
   12925             : 
   12926             :     /* "View.MemoryView":781
   12927             :  *         return memoryview_fromslice(dst, new_ndim,
   12928             :  *                                     memviewsliceobj.to_object_func,
   12929             :  *                                     memviewsliceobj.to_dtype_func,             # <<<<<<<<<<<<<<
   12930             :  *                                     memview.dtype_is_object)
   12931             :  *     else:
   12932             :  */
   12933           0 :     if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 781, __pyx_L1_error) }
   12934             : 
   12935             :     /* "View.MemoryView":779
   12936             :  * 
   12937             :  *     if isinstance(memview, _memoryviewslice):
   12938             :  *         return memoryview_fromslice(dst, new_ndim,             # <<<<<<<<<<<<<<
   12939             :  *                                     memviewsliceobj.to_object_func,
   12940             :  *                                     memviewsliceobj.to_dtype_func,
   12941             :  */
   12942           0 :     __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, __pyx_v_memviewsliceobj->to_object_func, __pyx_v_memviewsliceobj->to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 779, __pyx_L1_error)
   12943           0 :     __Pyx_GOTREF(__pyx_t_2);
   12944           0 :     if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_memoryview_type))))) __PYX_ERR(1, 779, __pyx_L1_error)
   12945           0 :     __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_2);
   12946           0 :     __pyx_t_2 = 0;
   12947           0 :     goto __pyx_L0;
   12948             : 
   12949             :     /* "View.MemoryView":778
   12950             :  *             new_ndim += 1
   12951             :  * 
   12952             :  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
   12953             :  *         return memoryview_fromslice(dst, new_ndim,
   12954             :  *                                     memviewsliceobj.to_object_func,
   12955             :  */
   12956             :   }
   12957             : 
   12958             :   /* "View.MemoryView":784
   12959             :  *                                     memview.dtype_is_object)
   12960             :  *     else:
   12961             :  *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,             # <<<<<<<<<<<<<<
   12962             :  *                                     memview.dtype_is_object)
   12963             :  * 
   12964             :  */
   12965             :   /*else*/ {
   12966           0 :     __Pyx_XDECREF((PyObject *)__pyx_r);
   12967             : 
   12968             :     /* "View.MemoryView":785
   12969             :  *     else:
   12970             :  *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,
   12971             :  *                                     memview.dtype_is_object)             # <<<<<<<<<<<<<<
   12972             :  * 
   12973             :  * 
   12974             :  */
   12975           0 :     __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, NULL, NULL, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 784, __pyx_L1_error)
   12976           0 :     __Pyx_GOTREF(__pyx_t_2);
   12977             : 
   12978             :     /* "View.MemoryView":784
   12979             :  *                                     memview.dtype_is_object)
   12980             :  *     else:
   12981             :  *         return memoryview_fromslice(dst, new_ndim, NULL, NULL,             # <<<<<<<<<<<<<<
   12982             :  *                                     memview.dtype_is_object)
   12983             :  * 
   12984             :  */
   12985           0 :     if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_memoryview_type))))) __PYX_ERR(1, 784, __pyx_L1_error)
   12986           0 :     __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_2);
   12987           0 :     __pyx_t_2 = 0;
   12988           0 :     goto __pyx_L0;
   12989             :   }
   12990             : 
   12991             :   /* "View.MemoryView":711
   12992             :  * 
   12993             :  * @cname('__pyx_memview_slice')
   12994             :  * cdef memoryview memview_slice(memoryview memview, object indices):             # <<<<<<<<<<<<<<
   12995             :  *     cdef int new_ndim = 0, suboffset_dim = -1, dim
   12996             :  *     cdef bint negative_step
   12997             :  */
   12998             : 
   12999             :   /* function exit code */
   13000           0 :   __pyx_L1_error:;
   13001           0 :   __Pyx_XDECREF(__pyx_t_2);
   13002           0 :   __Pyx_XDECREF(__pyx_t_8);
   13003           0 :   __Pyx_AddTraceback("View.MemoryView.memview_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
   13004           0 :   __pyx_r = 0;
   13005           0 :   __pyx_L0:;
   13006           0 :   __Pyx_XDECREF((PyObject *)__pyx_v_memviewsliceobj);
   13007           0 :   __Pyx_XDECREF(__pyx_v_index);
   13008           0 :   __Pyx_XGIVEREF((PyObject *)__pyx_r);
   13009           0 :   __Pyx_RefNannyFinishContext();
   13010           0 :   return __pyx_r;
   13011             : }
   13012             : 
   13013             : /* "View.MemoryView":793
   13014             :  * 
   13015             :  * @cname('__pyx_memoryview_slice_memviewslice')
   13016             :  * cdef int slice_memviewslice(             # <<<<<<<<<<<<<<
   13017             :  *         __Pyx_memviewslice *dst,
   13018             :  *         Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
   13019             :  */
   13020             : 
   13021           0 : static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst, Py_ssize_t __pyx_v_shape, Py_ssize_t __pyx_v_stride, Py_ssize_t __pyx_v_suboffset, int __pyx_v_dim, int __pyx_v_new_ndim, int *__pyx_v_suboffset_dim, Py_ssize_t __pyx_v_start, Py_ssize_t __pyx_v_stop, Py_ssize_t __pyx_v_step, int __pyx_v_have_start, int __pyx_v_have_stop, int __pyx_v_have_step, int __pyx_v_is_slice) {
   13022           0 :   Py_ssize_t __pyx_v_new_shape;
   13023           0 :   int __pyx_v_negative_step;
   13024           0 :   int __pyx_r;
   13025           0 :   int __pyx_t_1;
   13026           0 :   int __pyx_t_2;
   13027           0 :   int __pyx_t_3;
   13028           0 :   int __pyx_lineno = 0;
   13029           0 :   const char *__pyx_filename = NULL;
   13030           0 :   int __pyx_clineno = 0;
   13031             :   #ifdef WITH_THREAD
   13032           0 :   PyGILState_STATE __pyx_gilstate_save;
   13033             :   #endif
   13034             : 
   13035             :   /* "View.MemoryView":813
   13036             :  *     cdef bint negative_step
   13037             :  * 
   13038             :  *     if not is_slice:             # <<<<<<<<<<<<<<
   13039             :  * 
   13040             :  *         if start < 0:
   13041             :  */
   13042           0 :   __pyx_t_1 = (!__pyx_v_is_slice);
   13043           0 :   if (__pyx_t_1) {
   13044             : 
   13045             :     /* "View.MemoryView":815
   13046             :  *     if not is_slice:
   13047             :  * 
   13048             :  *         if start < 0:             # <<<<<<<<<<<<<<
   13049             :  *             start += shape
   13050             :  *         if not 0 <= start < shape:
   13051             :  */
   13052           0 :     __pyx_t_1 = (__pyx_v_start < 0);
   13053           0 :     if (__pyx_t_1) {
   13054             : 
   13055             :       /* "View.MemoryView":816
   13056             :  * 
   13057             :  *         if start < 0:
   13058             :  *             start += shape             # <<<<<<<<<<<<<<
   13059             :  *         if not 0 <= start < shape:
   13060             :  *             _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim)
   13061             :  */
   13062           0 :       __pyx_v_start = (__pyx_v_start + __pyx_v_shape);
   13063             : 
   13064             :       /* "View.MemoryView":815
   13065             :  *     if not is_slice:
   13066             :  * 
   13067             :  *         if start < 0:             # <<<<<<<<<<<<<<
   13068             :  *             start += shape
   13069             :  *         if not 0 <= start < shape:
   13070             :  */
   13071             :     }
   13072             : 
   13073             :     /* "View.MemoryView":817
   13074             :  *         if start < 0:
   13075             :  *             start += shape
   13076             :  *         if not 0 <= start < shape:             # <<<<<<<<<<<<<<
   13077             :  *             _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim)
   13078             :  *     else:
   13079             :  */
   13080           0 :     __pyx_t_1 = (0 <= __pyx_v_start);
   13081           0 :     if (__pyx_t_1) {
   13082           0 :       __pyx_t_1 = (__pyx_v_start < __pyx_v_shape);
   13083             :     }
   13084           0 :     __pyx_t_2 = (!__pyx_t_1);
   13085           0 :     if (__pyx_t_2) {
   13086             : 
   13087             :       /* "View.MemoryView":818
   13088             :  *             start += shape
   13089             :  *         if not 0 <= start < shape:
   13090             :  *             _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim)             # <<<<<<<<<<<<<<
   13091             :  *     else:
   13092             :  * 
   13093             :  */
   13094           0 :       __pyx_t_3 = __pyx_memoryview_err_dim(PyExc_IndexError, __pyx_kp_s_Index_out_of_bounds_axis_d, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 818, __pyx_L1_error)
   13095             : 
   13096             :       /* "View.MemoryView":817
   13097             :  *         if start < 0:
   13098             :  *             start += shape
   13099             :  *         if not 0 <= start < shape:             # <<<<<<<<<<<<<<
   13100             :  *             _err_dim(PyExc_IndexError, "Index out of bounds (axis %d)", dim)
   13101             :  *     else:
   13102             :  */
   13103             :     }
   13104             : 
   13105             :     /* "View.MemoryView":813
   13106             :  *     cdef bint negative_step
   13107             :  * 
   13108             :  *     if not is_slice:             # <<<<<<<<<<<<<<
   13109             :  * 
   13110             :  *         if start < 0:
   13111             :  */
   13112           0 :     goto __pyx_L3;
   13113             :   }
   13114             : 
   13115             :   /* "View.MemoryView":821
   13116             :  *     else:
   13117             :  * 
   13118             :  *         if have_step:             # <<<<<<<<<<<<<<
   13119             :  *             negative_step = step < 0
   13120             :  *             if step == 0:
   13121             :  */
   13122             :   /*else*/ {
   13123           0 :     __pyx_t_2 = (__pyx_v_have_step != 0);
   13124           0 :     if (__pyx_t_2) {
   13125             : 
   13126             :       /* "View.MemoryView":822
   13127             :  * 
   13128             :  *         if have_step:
   13129             :  *             negative_step = step < 0             # <<<<<<<<<<<<<<
   13130             :  *             if step == 0:
   13131             :  *                 _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim)
   13132             :  */
   13133           0 :       __pyx_v_negative_step = (__pyx_v_step < 0);
   13134             : 
   13135             :       /* "View.MemoryView":823
   13136             :  *         if have_step:
   13137             :  *             negative_step = step < 0
   13138             :  *             if step == 0:             # <<<<<<<<<<<<<<
   13139             :  *                 _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim)
   13140             :  *         else:
   13141             :  */
   13142           0 :       __pyx_t_2 = (__pyx_v_step == 0);
   13143           0 :       if (__pyx_t_2) {
   13144             : 
   13145             :         /* "View.MemoryView":824
   13146             :  *             negative_step = step < 0
   13147             :  *             if step == 0:
   13148             :  *                 _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim)             # <<<<<<<<<<<<<<
   13149             :  *         else:
   13150             :  *             negative_step = False
   13151             :  */
   13152           0 :         __pyx_t_3 = __pyx_memoryview_err_dim(PyExc_ValueError, __pyx_kp_s_Step_may_not_be_zero_axis_d, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 824, __pyx_L1_error)
   13153             : 
   13154             :         /* "View.MemoryView":823
   13155             :  *         if have_step:
   13156             :  *             negative_step = step < 0
   13157             :  *             if step == 0:             # <<<<<<<<<<<<<<
   13158             :  *                 _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim)
   13159             :  *         else:
   13160             :  */
   13161             :       }
   13162             : 
   13163             :       /* "View.MemoryView":821
   13164             :  *     else:
   13165             :  * 
   13166             :  *         if have_step:             # <<<<<<<<<<<<<<
   13167             :  *             negative_step = step < 0
   13168             :  *             if step == 0:
   13169             :  */
   13170           0 :       goto __pyx_L6;
   13171             :     }
   13172             : 
   13173             :     /* "View.MemoryView":826
   13174             :  *                 _err_dim(PyExc_ValueError, "Step may not be zero (axis %d)", dim)
   13175             :  *         else:
   13176             :  *             negative_step = False             # <<<<<<<<<<<<<<
   13177             :  *             step = 1
   13178             :  * 
   13179             :  */
   13180             :     /*else*/ {
   13181             :       __pyx_v_negative_step = 0;
   13182             : 
   13183             :       /* "View.MemoryView":827
   13184             :  *         else:
   13185             :  *             negative_step = False
   13186             :  *             step = 1             # <<<<<<<<<<<<<<
   13187             :  * 
   13188             :  * 
   13189             :  */
   13190             :       __pyx_v_step = 1;
   13191             :     }
   13192           0 :     __pyx_L6:;
   13193             : 
   13194             :     /* "View.MemoryView":830
   13195             :  * 
   13196             :  * 
   13197             :  *         if have_start:             # <<<<<<<<<<<<<<
   13198             :  *             if start < 0:
   13199             :  *                 start += shape
   13200             :  */
   13201           0 :     __pyx_t_2 = (__pyx_v_have_start != 0);
   13202           0 :     if (__pyx_t_2) {
   13203             : 
   13204             :       /* "View.MemoryView":831
   13205             :  * 
   13206             :  *         if have_start:
   13207             :  *             if start < 0:             # <<<<<<<<<<<<<<
   13208             :  *                 start += shape
   13209             :  *                 if start < 0:
   13210             :  */
   13211           0 :       __pyx_t_2 = (__pyx_v_start < 0);
   13212           0 :       if (__pyx_t_2) {
   13213             : 
   13214             :         /* "View.MemoryView":832
   13215             :  *         if have_start:
   13216             :  *             if start < 0:
   13217             :  *                 start += shape             # <<<<<<<<<<<<<<
   13218             :  *                 if start < 0:
   13219             :  *                     start = 0
   13220             :  */
   13221           0 :         __pyx_v_start = (__pyx_v_start + __pyx_v_shape);
   13222             : 
   13223             :         /* "View.MemoryView":833
   13224             :  *             if start < 0:
   13225             :  *                 start += shape
   13226             :  *                 if start < 0:             # <<<<<<<<<<<<<<
   13227             :  *                     start = 0
   13228             :  *             elif start >= shape:
   13229             :  */
   13230           0 :         __pyx_t_2 = (__pyx_v_start < 0);
   13231           0 :         if (__pyx_t_2) {
   13232             : 
   13233             :           /* "View.MemoryView":834
   13234             :  *                 start += shape
   13235             :  *                 if start < 0:
   13236             :  *                     start = 0             # <<<<<<<<<<<<<<
   13237             :  *             elif start >= shape:
   13238             :  *                 if negative_step:
   13239             :  */
   13240             :           __pyx_v_start = 0;
   13241             : 
   13242             :           /* "View.MemoryView":833
   13243             :  *             if start < 0:
   13244             :  *                 start += shape
   13245             :  *                 if start < 0:             # <<<<<<<<<<<<<<
   13246             :  *                     start = 0
   13247             :  *             elif start >= shape:
   13248             :  */
   13249             :         }
   13250             : 
   13251             :         /* "View.MemoryView":831
   13252             :  * 
   13253             :  *         if have_start:
   13254             :  *             if start < 0:             # <<<<<<<<<<<<<<
   13255             :  *                 start += shape
   13256             :  *                 if start < 0:
   13257             :  */
   13258           0 :         goto __pyx_L9;
   13259             :       }
   13260             : 
   13261             :       /* "View.MemoryView":835
   13262             :  *                 if start < 0:
   13263             :  *                     start = 0
   13264             :  *             elif start >= shape:             # <<<<<<<<<<<<<<
   13265             :  *                 if negative_step:
   13266             :  *                     start = shape - 1
   13267             :  */
   13268           0 :       __pyx_t_2 = (__pyx_v_start >= __pyx_v_shape);
   13269           0 :       if (__pyx_t_2) {
   13270             : 
   13271             :         /* "View.MemoryView":836
   13272             :  *                     start = 0
   13273             :  *             elif start >= shape:
   13274             :  *                 if negative_step:             # <<<<<<<<<<<<<<
   13275             :  *                     start = shape - 1
   13276             :  *                 else:
   13277             :  */
   13278           0 :         if (__pyx_v_negative_step) {
   13279             : 
   13280             :           /* "View.MemoryView":837
   13281             :  *             elif start >= shape:
   13282             :  *                 if negative_step:
   13283             :  *                     start = shape - 1             # <<<<<<<<<<<<<<
   13284             :  *                 else:
   13285             :  *                     start = shape
   13286             :  */
   13287           0 :           __pyx_v_start = (__pyx_v_shape - 1);
   13288             : 
   13289             :           /* "View.MemoryView":836
   13290             :  *                     start = 0
   13291             :  *             elif start >= shape:
   13292             :  *                 if negative_step:             # <<<<<<<<<<<<<<
   13293             :  *                     start = shape - 1
   13294             :  *                 else:
   13295             :  */
   13296           0 :           goto __pyx_L11;
   13297             :         }
   13298             : 
   13299             :         /* "View.MemoryView":839
   13300             :  *                     start = shape - 1
   13301             :  *                 else:
   13302             :  *                     start = shape             # <<<<<<<<<<<<<<
   13303             :  *         else:
   13304             :  *             if negative_step:
   13305             :  */
   13306             :         /*else*/ {
   13307             :           __pyx_v_start = __pyx_v_shape;
   13308             :         }
   13309           0 :         __pyx_L11:;
   13310             : 
   13311             :         /* "View.MemoryView":835
   13312             :  *                 if start < 0:
   13313             :  *                     start = 0
   13314             :  *             elif start >= shape:             # <<<<<<<<<<<<<<
   13315             :  *                 if negative_step:
   13316             :  *                     start = shape - 1
   13317             :  */
   13318             :       }
   13319           0 :       __pyx_L9:;
   13320             : 
   13321             :       /* "View.MemoryView":830
   13322             :  * 
   13323             :  * 
   13324             :  *         if have_start:             # <<<<<<<<<<<<<<
   13325             :  *             if start < 0:
   13326             :  *                 start += shape
   13327             :  */
   13328           0 :       goto __pyx_L8;
   13329             :     }
   13330             : 
   13331             :     /* "View.MemoryView":841
   13332             :  *                     start = shape
   13333             :  *         else:
   13334             :  *             if negative_step:             # <<<<<<<<<<<<<<
   13335             :  *                 start = shape - 1
   13336             :  *             else:
   13337             :  */
   13338             :     /*else*/ {
   13339           0 :       if (__pyx_v_negative_step) {
   13340             : 
   13341             :         /* "View.MemoryView":842
   13342             :  *         else:
   13343             :  *             if negative_step:
   13344             :  *                 start = shape - 1             # <<<<<<<<<<<<<<
   13345             :  *             else:
   13346             :  *                 start = 0
   13347             :  */
   13348           0 :         __pyx_v_start = (__pyx_v_shape - 1);
   13349             : 
   13350             :         /* "View.MemoryView":841
   13351             :  *                     start = shape
   13352             :  *         else:
   13353             :  *             if negative_step:             # <<<<<<<<<<<<<<
   13354             :  *                 start = shape - 1
   13355             :  *             else:
   13356             :  */
   13357           0 :         goto __pyx_L12;
   13358             :       }
   13359             : 
   13360             :       /* "View.MemoryView":844
   13361             :  *                 start = shape - 1
   13362             :  *             else:
   13363             :  *                 start = 0             # <<<<<<<<<<<<<<
   13364             :  * 
   13365             :  *         if have_stop:
   13366             :  */
   13367             :       /*else*/ {
   13368             :         __pyx_v_start = 0;
   13369             :       }
   13370           0 :       __pyx_L12:;
   13371             :     }
   13372           0 :     __pyx_L8:;
   13373             : 
   13374             :     /* "View.MemoryView":846
   13375             :  *                 start = 0
   13376             :  * 
   13377             :  *         if have_stop:             # <<<<<<<<<<<<<<
   13378             :  *             if stop < 0:
   13379             :  *                 stop += shape
   13380             :  */
   13381           0 :     __pyx_t_2 = (__pyx_v_have_stop != 0);
   13382           0 :     if (__pyx_t_2) {
   13383             : 
   13384             :       /* "View.MemoryView":847
   13385             :  * 
   13386             :  *         if have_stop:
   13387             :  *             if stop < 0:             # <<<<<<<<<<<<<<
   13388             :  *                 stop += shape
   13389             :  *                 if stop < 0:
   13390             :  */
   13391           0 :       __pyx_t_2 = (__pyx_v_stop < 0);
   13392           0 :       if (__pyx_t_2) {
   13393             : 
   13394             :         /* "View.MemoryView":848
   13395             :  *         if have_stop:
   13396             :  *             if stop < 0:
   13397             :  *                 stop += shape             # <<<<<<<<<<<<<<
   13398             :  *                 if stop < 0:
   13399             :  *                     stop = 0
   13400             :  */
   13401           0 :         __pyx_v_stop = (__pyx_v_stop + __pyx_v_shape);
   13402             : 
   13403             :         /* "View.MemoryView":849
   13404             :  *             if stop < 0:
   13405             :  *                 stop += shape
   13406             :  *                 if stop < 0:             # <<<<<<<<<<<<<<
   13407             :  *                     stop = 0
   13408             :  *             elif stop > shape:
   13409             :  */
   13410           0 :         __pyx_t_2 = (__pyx_v_stop < 0);
   13411           0 :         if (__pyx_t_2) {
   13412             : 
   13413             :           /* "View.MemoryView":850
   13414             :  *                 stop += shape
   13415             :  *                 if stop < 0:
   13416             :  *                     stop = 0             # <<<<<<<<<<<<<<
   13417             :  *             elif stop > shape:
   13418             :  *                 stop = shape
   13419             :  */
   13420             :           __pyx_v_stop = 0;
   13421             : 
   13422             :           /* "View.MemoryView":849
   13423             :  *             if stop < 0:
   13424             :  *                 stop += shape
   13425             :  *                 if stop < 0:             # <<<<<<<<<<<<<<
   13426             :  *                     stop = 0
   13427             :  *             elif stop > shape:
   13428             :  */
   13429             :         }
   13430             : 
   13431             :         /* "View.MemoryView":847
   13432             :  * 
   13433             :  *         if have_stop:
   13434             :  *             if stop < 0:             # <<<<<<<<<<<<<<
   13435             :  *                 stop += shape
   13436             :  *                 if stop < 0:
   13437             :  */
   13438           0 :         goto __pyx_L14;
   13439             :       }
   13440             : 
   13441             :       /* "View.MemoryView":851
   13442             :  *                 if stop < 0:
   13443             :  *                     stop = 0
   13444             :  *             elif stop > shape:             # <<<<<<<<<<<<<<
   13445             :  *                 stop = shape
   13446             :  *         else:
   13447             :  */
   13448           0 :       __pyx_t_2 = (__pyx_v_stop > __pyx_v_shape);
   13449           0 :       if (__pyx_t_2) {
   13450             : 
   13451             :         /* "View.MemoryView":852
   13452             :  *                     stop = 0
   13453             :  *             elif stop > shape:
   13454             :  *                 stop = shape             # <<<<<<<<<<<<<<
   13455             :  *         else:
   13456             :  *             if negative_step:
   13457             :  */
   13458             :         __pyx_v_stop = __pyx_v_shape;
   13459             : 
   13460             :         /* "View.MemoryView":851
   13461             :  *                 if stop < 0:
   13462             :  *                     stop = 0
   13463             :  *             elif stop > shape:             # <<<<<<<<<<<<<<
   13464             :  *                 stop = shape
   13465             :  *         else:
   13466             :  */
   13467             :       }
   13468           0 :       __pyx_L14:;
   13469             : 
   13470             :       /* "View.MemoryView":846
   13471             :  *                 start = 0
   13472             :  * 
   13473             :  *         if have_stop:             # <<<<<<<<<<<<<<
   13474             :  *             if stop < 0:
   13475             :  *                 stop += shape
   13476             :  */
   13477           0 :       goto __pyx_L13;
   13478             :     }
   13479             : 
   13480             :     /* "View.MemoryView":854
   13481             :  *                 stop = shape
   13482             :  *         else:
   13483             :  *             if negative_step:             # <<<<<<<<<<<<<<
   13484             :  *                 stop = -1
   13485             :  *             else:
   13486             :  */
   13487             :     /*else*/ {
   13488           0 :       if (__pyx_v_negative_step) {
   13489             : 
   13490             :         /* "View.MemoryView":855
   13491             :  *         else:
   13492             :  *             if negative_step:
   13493             :  *                 stop = -1             # <<<<<<<<<<<<<<
   13494             :  *             else:
   13495             :  *                 stop = shape
   13496             :  */
   13497           0 :         __pyx_v_stop = -1L;
   13498             : 
   13499             :         /* "View.MemoryView":854
   13500             :  *                 stop = shape
   13501             :  *         else:
   13502             :  *             if negative_step:             # <<<<<<<<<<<<<<
   13503             :  *                 stop = -1
   13504             :  *             else:
   13505             :  */
   13506           0 :         goto __pyx_L16;
   13507             :       }
   13508             : 
   13509             :       /* "View.MemoryView":857
   13510             :  *                 stop = -1
   13511             :  *             else:
   13512             :  *                 stop = shape             # <<<<<<<<<<<<<<
   13513             :  * 
   13514             :  * 
   13515             :  */
   13516             :       /*else*/ {
   13517             :         __pyx_v_stop = __pyx_v_shape;
   13518             :       }
   13519           0 :       __pyx_L16:;
   13520             :     }
   13521           0 :     __pyx_L13:;
   13522             : 
   13523             :     /* "View.MemoryView":861
   13524             :  * 
   13525             :  *         with cython.cdivision(True):
   13526             :  *             new_shape = (stop - start) // step             # <<<<<<<<<<<<<<
   13527             :  * 
   13528             :  *             if (stop - start) - step * new_shape:
   13529             :  */
   13530           0 :     __pyx_v_new_shape = ((__pyx_v_stop - __pyx_v_start) / __pyx_v_step);
   13531             : 
   13532             :     /* "View.MemoryView":863
   13533             :  *             new_shape = (stop - start) // step
   13534             :  * 
   13535             :  *             if (stop - start) - step * new_shape:             # <<<<<<<<<<<<<<
   13536             :  *                 new_shape += 1
   13537             :  * 
   13538             :  */
   13539           0 :     __pyx_t_2 = (((__pyx_v_stop - __pyx_v_start) - (__pyx_v_step * __pyx_v_new_shape)) != 0);
   13540           0 :     if (__pyx_t_2) {
   13541             : 
   13542             :       /* "View.MemoryView":864
   13543             :  * 
   13544             :  *             if (stop - start) - step * new_shape:
   13545             :  *                 new_shape += 1             # <<<<<<<<<<<<<<
   13546             :  * 
   13547             :  *         if new_shape < 0:
   13548             :  */
   13549           0 :       __pyx_v_new_shape = (__pyx_v_new_shape + 1);
   13550             : 
   13551             :       /* "View.MemoryView":863
   13552             :  *             new_shape = (stop - start) // step
   13553             :  * 
   13554             :  *             if (stop - start) - step * new_shape:             # <<<<<<<<<<<<<<
   13555             :  *                 new_shape += 1
   13556             :  * 
   13557             :  */
   13558             :     }
   13559             : 
   13560             :     /* "View.MemoryView":866
   13561             :  *                 new_shape += 1
   13562             :  * 
   13563             :  *         if new_shape < 0:             # <<<<<<<<<<<<<<
   13564             :  *             new_shape = 0
   13565             :  * 
   13566             :  */
   13567           0 :     __pyx_t_2 = (__pyx_v_new_shape < 0);
   13568           0 :     if (__pyx_t_2) {
   13569             : 
   13570             :       /* "View.MemoryView":867
   13571             :  * 
   13572             :  *         if new_shape < 0:
   13573             :  *             new_shape = 0             # <<<<<<<<<<<<<<
   13574             :  * 
   13575             :  * 
   13576             :  */
   13577             :       __pyx_v_new_shape = 0;
   13578             : 
   13579             :       /* "View.MemoryView":866
   13580             :  *                 new_shape += 1
   13581             :  * 
   13582             :  *         if new_shape < 0:             # <<<<<<<<<<<<<<
   13583             :  *             new_shape = 0
   13584             :  * 
   13585             :  */
   13586             :     }
   13587             : 
   13588             :     /* "View.MemoryView":870
   13589             :  * 
   13590             :  * 
   13591             :  *         dst.strides[new_ndim] = stride * step             # <<<<<<<<<<<<<<
   13592             :  *         dst.shape[new_ndim] = new_shape
   13593             :  *         dst.suboffsets[new_ndim] = suboffset
   13594             :  */
   13595           0 :     (__pyx_v_dst->strides[__pyx_v_new_ndim]) = (__pyx_v_stride * __pyx_v_step);
   13596             : 
   13597             :     /* "View.MemoryView":871
   13598             :  * 
   13599             :  *         dst.strides[new_ndim] = stride * step
   13600             :  *         dst.shape[new_ndim] = new_shape             # <<<<<<<<<<<<<<
   13601             :  *         dst.suboffsets[new_ndim] = suboffset
   13602             :  * 
   13603             :  */
   13604           0 :     (__pyx_v_dst->shape[__pyx_v_new_ndim]) = __pyx_v_new_shape;
   13605             : 
   13606             :     /* "View.MemoryView":872
   13607             :  *         dst.strides[new_ndim] = stride * step
   13608             :  *         dst.shape[new_ndim] = new_shape
   13609             :  *         dst.suboffsets[new_ndim] = suboffset             # <<<<<<<<<<<<<<
   13610             :  * 
   13611             :  * 
   13612             :  */
   13613           0 :     (__pyx_v_dst->suboffsets[__pyx_v_new_ndim]) = __pyx_v_suboffset;
   13614             :   }
   13615           0 :   __pyx_L3:;
   13616             : 
   13617             :   /* "View.MemoryView":875
   13618             :  * 
   13619             :  * 
   13620             :  *     if suboffset_dim[0] < 0:             # <<<<<<<<<<<<<<
   13621             :  *         dst.data += start * stride
   13622             :  *     else:
   13623             :  */
   13624           0 :   __pyx_t_2 = ((__pyx_v_suboffset_dim[0]) < 0);
   13625           0 :   if (__pyx_t_2) {
   13626             : 
   13627             :     /* "View.MemoryView":876
   13628             :  * 
   13629             :  *     if suboffset_dim[0] < 0:
   13630             :  *         dst.data += start * stride             # <<<<<<<<<<<<<<
   13631             :  *     else:
   13632             :  *         dst.suboffsets[suboffset_dim[0]] += start * stride
   13633             :  */
   13634           0 :     __pyx_v_dst->data = (__pyx_v_dst->data + (__pyx_v_start * __pyx_v_stride));
   13635             : 
   13636             :     /* "View.MemoryView":875
   13637             :  * 
   13638             :  * 
   13639             :  *     if suboffset_dim[0] < 0:             # <<<<<<<<<<<<<<
   13640             :  *         dst.data += start * stride
   13641             :  *     else:
   13642             :  */
   13643           0 :     goto __pyx_L19;
   13644             :   }
   13645             : 
   13646             :   /* "View.MemoryView":878
   13647             :  *         dst.data += start * stride
   13648             :  *     else:
   13649             :  *         dst.suboffsets[suboffset_dim[0]] += start * stride             # <<<<<<<<<<<<<<
   13650             :  * 
   13651             :  *     if suboffset >= 0:
   13652             :  */
   13653             :   /*else*/ {
   13654           0 :     __pyx_t_3 = (__pyx_v_suboffset_dim[0]);
   13655           0 :     (__pyx_v_dst->suboffsets[__pyx_t_3]) = ((__pyx_v_dst->suboffsets[__pyx_t_3]) + (__pyx_v_start * __pyx_v_stride));
   13656             :   }
   13657           0 :   __pyx_L19:;
   13658             : 
   13659             :   /* "View.MemoryView":880
   13660             :  *         dst.suboffsets[suboffset_dim[0]] += start * stride
   13661             :  * 
   13662             :  *     if suboffset >= 0:             # <<<<<<<<<<<<<<
   13663             :  *         if not is_slice:
   13664             :  *             if new_ndim == 0:
   13665             :  */
   13666           0 :   __pyx_t_2 = (__pyx_v_suboffset >= 0);
   13667           0 :   if (__pyx_t_2) {
   13668             : 
   13669             :     /* "View.MemoryView":881
   13670             :  * 
   13671             :  *     if suboffset >= 0:
   13672             :  *         if not is_slice:             # <<<<<<<<<<<<<<
   13673             :  *             if new_ndim == 0:
   13674             :  *                 dst.data = (<char **> dst.data)[0] + suboffset
   13675             :  */
   13676           0 :     __pyx_t_2 = (!__pyx_v_is_slice);
   13677           0 :     if (__pyx_t_2) {
   13678             : 
   13679             :       /* "View.MemoryView":882
   13680             :  *     if suboffset >= 0:
   13681             :  *         if not is_slice:
   13682             :  *             if new_ndim == 0:             # <<<<<<<<<<<<<<
   13683             :  *                 dst.data = (<char **> dst.data)[0] + suboffset
   13684             :  *             else:
   13685             :  */
   13686           0 :       __pyx_t_2 = (__pyx_v_new_ndim == 0);
   13687           0 :       if (__pyx_t_2) {
   13688             : 
   13689             :         /* "View.MemoryView":883
   13690             :  *         if not is_slice:
   13691             :  *             if new_ndim == 0:
   13692             :  *                 dst.data = (<char **> dst.data)[0] + suboffset             # <<<<<<<<<<<<<<
   13693             :  *             else:
   13694             :  *                 _err_dim(PyExc_IndexError, "All dimensions preceding dimension %d "
   13695             :  */
   13696           0 :         __pyx_v_dst->data = ((((char **)__pyx_v_dst->data)[0]) + __pyx_v_suboffset);
   13697             : 
   13698             :         /* "View.MemoryView":882
   13699             :  *     if suboffset >= 0:
   13700             :  *         if not is_slice:
   13701             :  *             if new_ndim == 0:             # <<<<<<<<<<<<<<
   13702             :  *                 dst.data = (<char **> dst.data)[0] + suboffset
   13703             :  *             else:
   13704             :  */
   13705           0 :         goto __pyx_L22;
   13706             :       }
   13707             : 
   13708             :       /* "View.MemoryView":885
   13709             :  *                 dst.data = (<char **> dst.data)[0] + suboffset
   13710             :  *             else:
   13711             :  *                 _err_dim(PyExc_IndexError, "All dimensions preceding dimension %d "             # <<<<<<<<<<<<<<
   13712             :  *                                      "must be indexed and not sliced", dim)
   13713             :  *         else:
   13714             :  */
   13715             :       /*else*/ {
   13716             : 
   13717             :         /* "View.MemoryView":886
   13718             :  *             else:
   13719             :  *                 _err_dim(PyExc_IndexError, "All dimensions preceding dimension %d "
   13720             :  *                                      "must be indexed and not sliced", dim)             # <<<<<<<<<<<<<<
   13721             :  *         else:
   13722             :  *             suboffset_dim[0] = new_ndim
   13723             :  */
   13724           0 :         __pyx_t_3 = __pyx_memoryview_err_dim(PyExc_IndexError, __pyx_kp_s_All_dimensions_preceding_dimensi, __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 885, __pyx_L1_error)
   13725             :       }
   13726           0 :       __pyx_L22:;
   13727             : 
   13728             :       /* "View.MemoryView":881
   13729             :  * 
   13730             :  *     if suboffset >= 0:
   13731             :  *         if not is_slice:             # <<<<<<<<<<<<<<
   13732             :  *             if new_ndim == 0:
   13733             :  *                 dst.data = (<char **> dst.data)[0] + suboffset
   13734             :  */
   13735           0 :       goto __pyx_L21;
   13736             :     }
   13737             : 
   13738             :     /* "View.MemoryView":888
   13739             :  *                                      "must be indexed and not sliced", dim)
   13740             :  *         else:
   13741             :  *             suboffset_dim[0] = new_ndim             # <<<<<<<<<<<<<<
   13742             :  * 
   13743             :  *     return 0
   13744             :  */
   13745             :     /*else*/ {
   13746           0 :       (__pyx_v_suboffset_dim[0]) = __pyx_v_new_ndim;
   13747             :     }
   13748           0 :     __pyx_L21:;
   13749             : 
   13750             :     /* "View.MemoryView":880
   13751             :  *         dst.suboffsets[suboffset_dim[0]] += start * stride
   13752             :  * 
   13753             :  *     if suboffset >= 0:             # <<<<<<<<<<<<<<
   13754             :  *         if not is_slice:
   13755             :  *             if new_ndim == 0:
   13756             :  */
   13757             :   }
   13758             : 
   13759             :   /* "View.MemoryView":890
   13760             :  *             suboffset_dim[0] = new_ndim
   13761             :  * 
   13762             :  *     return 0             # <<<<<<<<<<<<<<
   13763             :  * 
   13764             :  * 
   13765             :  */
   13766           0 :   __pyx_r = 0;
   13767           0 :   goto __pyx_L0;
   13768             : 
   13769             :   /* "View.MemoryView":793
   13770             :  * 
   13771             :  * @cname('__pyx_memoryview_slice_memviewslice')
   13772             :  * cdef int slice_memviewslice(             # <<<<<<<<<<<<<<
   13773             :  *         __Pyx_memviewslice *dst,
   13774             :  *         Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
   13775             :  */
   13776             : 
   13777             :   /* function exit code */
   13778           0 :   __pyx_L1_error:;
   13779             :   #ifdef WITH_THREAD
   13780           0 :   __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   13781             :   #endif
   13782           0 :   __Pyx_AddTraceback("View.MemoryView.slice_memviewslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
   13783           0 :   __pyx_r = -1;
   13784             :   #ifdef WITH_THREAD
   13785           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   13786             :   #endif
   13787           0 :   __pyx_L0:;
   13788           0 :   return __pyx_r;
   13789             : }
   13790             : 
   13791             : /* "View.MemoryView":896
   13792             :  * 
   13793             :  * @cname('__pyx_pybuffer_index')
   13794             :  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,             # <<<<<<<<<<<<<<
   13795             :  *                           Py_ssize_t dim) except NULL:
   13796             :  *     cdef Py_ssize_t shape, stride, suboffset = -1
   13797             :  */
   13798             : 
   13799           0 : static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, Py_ssize_t __pyx_v_index, Py_ssize_t __pyx_v_dim) {
   13800           0 :   Py_ssize_t __pyx_v_shape;
   13801           0 :   Py_ssize_t __pyx_v_stride;
   13802           0 :   Py_ssize_t __pyx_v_suboffset;
   13803           0 :   Py_ssize_t __pyx_v_itemsize;
   13804           0 :   char *__pyx_v_resultp;
   13805           0 :   char *__pyx_r;
   13806             :   __Pyx_RefNannyDeclarations
   13807           0 :   Py_ssize_t __pyx_t_1;
   13808           0 :   int __pyx_t_2;
   13809           0 :   PyObject *__pyx_t_3 = NULL;
   13810           0 :   Py_UCS4 __pyx_t_4;
   13811           0 :   PyObject *__pyx_t_5 = NULL;
   13812           0 :   int __pyx_lineno = 0;
   13813           0 :   const char *__pyx_filename = NULL;
   13814           0 :   int __pyx_clineno = 0;
   13815           0 :   __Pyx_RefNannySetupContext("pybuffer_index", 1);
   13816             : 
   13817             :   /* "View.MemoryView":898
   13818             :  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,
   13819             :  *                           Py_ssize_t dim) except NULL:
   13820             :  *     cdef Py_ssize_t shape, stride, suboffset = -1             # <<<<<<<<<<<<<<
   13821             :  *     cdef Py_ssize_t itemsize = view.itemsize
   13822             :  *     cdef char *resultp
   13823             :  */
   13824           0 :   __pyx_v_suboffset = -1L;
   13825             : 
   13826             :   /* "View.MemoryView":899
   13827             :  *                           Py_ssize_t dim) except NULL:
   13828             :  *     cdef Py_ssize_t shape, stride, suboffset = -1
   13829             :  *     cdef Py_ssize_t itemsize = view.itemsize             # <<<<<<<<<<<<<<
   13830             :  *     cdef char *resultp
   13831             :  * 
   13832             :  */
   13833           0 :   __pyx_t_1 = __pyx_v_view->itemsize;
   13834           0 :   __pyx_v_itemsize = __pyx_t_1;
   13835             : 
   13836             :   /* "View.MemoryView":902
   13837             :  *     cdef char *resultp
   13838             :  * 
   13839             :  *     if view.ndim == 0:             # <<<<<<<<<<<<<<
   13840             :  *         shape = view.len // itemsize
   13841             :  *         stride = itemsize
   13842             :  */
   13843           0 :   __pyx_t_2 = (__pyx_v_view->ndim == 0);
   13844           0 :   if (__pyx_t_2) {
   13845             : 
   13846             :     /* "View.MemoryView":903
   13847             :  * 
   13848             :  *     if view.ndim == 0:
   13849             :  *         shape = view.len // itemsize             # <<<<<<<<<<<<<<
   13850             :  *         stride = itemsize
   13851             :  *     else:
   13852             :  */
   13853           0 :     if (unlikely(__pyx_v_itemsize == 0)) {
   13854           0 :       PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
   13855           0 :       __PYX_ERR(1, 903, __pyx_L1_error)
   13856             :     }
   13857           0 :     else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1)  && unlikely(__Pyx_UNARY_NEG_WOULD_OVERFLOW(__pyx_v_view->len))) {
   13858           0 :       PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
   13859           0 :       __PYX_ERR(1, 903, __pyx_L1_error)
   13860             :     }
   13861           0 :     __pyx_v_shape = __Pyx_div_Py_ssize_t(__pyx_v_view->len, __pyx_v_itemsize);
   13862             : 
   13863             :     /* "View.MemoryView":904
   13864             :  *     if view.ndim == 0:
   13865             :  *         shape = view.len // itemsize
   13866             :  *         stride = itemsize             # <<<<<<<<<<<<<<
   13867             :  *     else:
   13868             :  *         shape = view.shape[dim]
   13869             :  */
   13870           0 :     __pyx_v_stride = __pyx_v_itemsize;
   13871             : 
   13872             :     /* "View.MemoryView":902
   13873             :  *     cdef char *resultp
   13874             :  * 
   13875             :  *     if view.ndim == 0:             # <<<<<<<<<<<<<<
   13876             :  *         shape = view.len // itemsize
   13877             :  *         stride = itemsize
   13878             :  */
   13879           0 :     goto __pyx_L3;
   13880             :   }
   13881             : 
   13882             :   /* "View.MemoryView":906
   13883             :  *         stride = itemsize
   13884             :  *     else:
   13885             :  *         shape = view.shape[dim]             # <<<<<<<<<<<<<<
   13886             :  *         stride = view.strides[dim]
   13887             :  *         if view.suboffsets != NULL:
   13888             :  */
   13889             :   /*else*/ {
   13890           0 :     __pyx_v_shape = (__pyx_v_view->shape[__pyx_v_dim]);
   13891             : 
   13892             :     /* "View.MemoryView":907
   13893             :  *     else:
   13894             :  *         shape = view.shape[dim]
   13895             :  *         stride = view.strides[dim]             # <<<<<<<<<<<<<<
   13896             :  *         if view.suboffsets != NULL:
   13897             :  *             suboffset = view.suboffsets[dim]
   13898             :  */
   13899           0 :     __pyx_v_stride = (__pyx_v_view->strides[__pyx_v_dim]);
   13900             : 
   13901             :     /* "View.MemoryView":908
   13902             :  *         shape = view.shape[dim]
   13903             :  *         stride = view.strides[dim]
   13904             :  *         if view.suboffsets != NULL:             # <<<<<<<<<<<<<<
   13905             :  *             suboffset = view.suboffsets[dim]
   13906             :  * 
   13907             :  */
   13908           0 :     __pyx_t_2 = (__pyx_v_view->suboffsets != NULL);
   13909           0 :     if (__pyx_t_2) {
   13910             : 
   13911             :       /* "View.MemoryView":909
   13912             :  *         stride = view.strides[dim]
   13913             :  *         if view.suboffsets != NULL:
   13914             :  *             suboffset = view.suboffsets[dim]             # <<<<<<<<<<<<<<
   13915             :  * 
   13916             :  *     if index < 0:
   13917             :  */
   13918           0 :       __pyx_v_suboffset = (__pyx_v_view->suboffsets[__pyx_v_dim]);
   13919             : 
   13920             :       /* "View.MemoryView":908
   13921             :  *         shape = view.shape[dim]
   13922             :  *         stride = view.strides[dim]
   13923             :  *         if view.suboffsets != NULL:             # <<<<<<<<<<<<<<
   13924             :  *             suboffset = view.suboffsets[dim]
   13925             :  * 
   13926             :  */
   13927             :     }
   13928             :   }
   13929           0 :   __pyx_L3:;
   13930             : 
   13931             :   /* "View.MemoryView":911
   13932             :  *             suboffset = view.suboffsets[dim]
   13933             :  * 
   13934             :  *     if index < 0:             # <<<<<<<<<<<<<<
   13935             :  *         index += view.shape[dim]
   13936             :  *         if index < 0:
   13937             :  */
   13938           0 :   __pyx_t_2 = (__pyx_v_index < 0);
   13939           0 :   if (__pyx_t_2) {
   13940             : 
   13941             :     /* "View.MemoryView":912
   13942             :  * 
   13943             :  *     if index < 0:
   13944             :  *         index += view.shape[dim]             # <<<<<<<<<<<<<<
   13945             :  *         if index < 0:
   13946             :  *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
   13947             :  */
   13948           0 :     __pyx_v_index = (__pyx_v_index + (__pyx_v_view->shape[__pyx_v_dim]));
   13949             : 
   13950             :     /* "View.MemoryView":913
   13951             :  *     if index < 0:
   13952             :  *         index += view.shape[dim]
   13953             :  *         if index < 0:             # <<<<<<<<<<<<<<
   13954             :  *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
   13955             :  * 
   13956             :  */
   13957           0 :     __pyx_t_2 = (__pyx_v_index < 0);
   13958           0 :     if (unlikely(__pyx_t_2)) {
   13959             : 
   13960             :       /* "View.MemoryView":914
   13961             :  *         index += view.shape[dim]
   13962             :  *         if index < 0:
   13963             :  *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"             # <<<<<<<<<<<<<<
   13964             :  * 
   13965             :  *     if index >= shape:
   13966             :  */
   13967           0 :       __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 914, __pyx_L1_error)
   13968           0 :       __Pyx_GOTREF(__pyx_t_3);
   13969           0 :       __pyx_t_1 = 0;
   13970           0 :       __pyx_t_4 = 127;
   13971           0 :       __Pyx_INCREF(__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
   13972           0 :       __pyx_t_1 += 37;
   13973           0 :       __Pyx_GIVEREF(__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
   13974           0 :       PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Out_of_bounds_on_buffer_access_a);
   13975           0 :       __pyx_t_5 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 914, __pyx_L1_error)
   13976           0 :       __Pyx_GOTREF(__pyx_t_5);
   13977           0 :       __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
   13978           0 :       __Pyx_GIVEREF(__pyx_t_5);
   13979           0 :       PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
   13980           0 :       __pyx_t_5 = 0;
   13981           0 :       __Pyx_INCREF(__pyx_kp_u__7);
   13982           0 :       __pyx_t_1 += 1;
   13983           0 :       __Pyx_GIVEREF(__pyx_kp_u__7);
   13984           0 :       PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__7);
   13985           0 :       __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 914, __pyx_L1_error)
   13986           0 :       __Pyx_GOTREF(__pyx_t_5);
   13987           0 :       __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   13988           0 :       __Pyx_Raise(__pyx_builtin_IndexError, __pyx_t_5, 0, 0);
   13989           0 :       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   13990           0 :       __PYX_ERR(1, 914, __pyx_L1_error)
   13991             : 
   13992             :       /* "View.MemoryView":913
   13993             :  *     if index < 0:
   13994             :  *         index += view.shape[dim]
   13995             :  *         if index < 0:             # <<<<<<<<<<<<<<
   13996             :  *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
   13997             :  * 
   13998             :  */
   13999             :     }
   14000             : 
   14001             :     /* "View.MemoryView":911
   14002             :  *             suboffset = view.suboffsets[dim]
   14003             :  * 
   14004             :  *     if index < 0:             # <<<<<<<<<<<<<<
   14005             :  *         index += view.shape[dim]
   14006             :  *         if index < 0:
   14007             :  */
   14008             :   }
   14009             : 
   14010             :   /* "View.MemoryView":916
   14011             :  *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
   14012             :  * 
   14013             :  *     if index >= shape:             # <<<<<<<<<<<<<<
   14014             :  *         raise IndexError, f"Out of bounds on buffer access (axis {dim})"
   14015             :  * 
   14016             :  */
   14017           0 :   __pyx_t_2 = (__pyx_v_index >= __pyx_v_shape);
   14018           0 :   if (unlikely(__pyx_t_2)) {
   14019             : 
   14020             :     /* "View.MemoryView":917
   14021             :  * 
   14022             :  *     if index >= shape:
   14023             :  *         raise IndexError, f"Out of bounds on buffer access (axis {dim})"             # <<<<<<<<<<<<<<
   14024             :  * 
   14025             :  *     resultp = bufp + index * stride
   14026             :  */
   14027           0 :     __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 917, __pyx_L1_error)
   14028           0 :     __Pyx_GOTREF(__pyx_t_5);
   14029           0 :     __pyx_t_1 = 0;
   14030           0 :     __pyx_t_4 = 127;
   14031           0 :     __Pyx_INCREF(__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
   14032           0 :     __pyx_t_1 += 37;
   14033           0 :     __Pyx_GIVEREF(__pyx_kp_u_Out_of_bounds_on_buffer_access_a);
   14034           0 :     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Out_of_bounds_on_buffer_access_a);
   14035           0 :     __pyx_t_3 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_dim, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 917, __pyx_L1_error)
   14036           0 :     __Pyx_GOTREF(__pyx_t_3);
   14037           0 :     __pyx_t_1 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
   14038           0 :     __Pyx_GIVEREF(__pyx_t_3);
   14039           0 :     PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
   14040           0 :     __pyx_t_3 = 0;
   14041           0 :     __Pyx_INCREF(__pyx_kp_u__7);
   14042           0 :     __pyx_t_1 += 1;
   14043           0 :     __Pyx_GIVEREF(__pyx_kp_u__7);
   14044           0 :     PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__7);
   14045           0 :     __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 917, __pyx_L1_error)
   14046           0 :     __Pyx_GOTREF(__pyx_t_3);
   14047           0 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   14048           0 :     __Pyx_Raise(__pyx_builtin_IndexError, __pyx_t_3, 0, 0);
   14049           0 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   14050           0 :     __PYX_ERR(1, 917, __pyx_L1_error)
   14051             : 
   14052             :     /* "View.MemoryView":916
   14053             :  *             raise IndexError, f"Out of bounds on buffer access (axis {dim})"
   14054             :  * 
   14055             :  *     if index >= shape:             # <<<<<<<<<<<<<<
   14056             :  *         raise IndexError, f"Out of bounds on buffer access (axis {dim})"
   14057             :  * 
   14058             :  */
   14059             :   }
   14060             : 
   14061             :   /* "View.MemoryView":919
   14062             :  *         raise IndexError, f"Out of bounds on buffer access (axis {dim})"
   14063             :  * 
   14064             :  *     resultp = bufp + index * stride             # <<<<<<<<<<<<<<
   14065             :  *     if suboffset >= 0:
   14066             :  *         resultp = (<char **> resultp)[0] + suboffset
   14067             :  */
   14068           0 :   __pyx_v_resultp = (__pyx_v_bufp + (__pyx_v_index * __pyx_v_stride));
   14069             : 
   14070             :   /* "View.MemoryView":920
   14071             :  * 
   14072             :  *     resultp = bufp + index * stride
   14073             :  *     if suboffset >= 0:             # <<<<<<<<<<<<<<
   14074             :  *         resultp = (<char **> resultp)[0] + suboffset
   14075             :  * 
   14076             :  */
   14077           0 :   __pyx_t_2 = (__pyx_v_suboffset >= 0);
   14078           0 :   if (__pyx_t_2) {
   14079             : 
   14080             :     /* "View.MemoryView":921
   14081             :  *     resultp = bufp + index * stride
   14082             :  *     if suboffset >= 0:
   14083             :  *         resultp = (<char **> resultp)[0] + suboffset             # <<<<<<<<<<<<<<
   14084             :  * 
   14085             :  *     return resultp
   14086             :  */
   14087           0 :     __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset);
   14088             : 
   14089             :     /* "View.MemoryView":920
   14090             :  * 
   14091             :  *     resultp = bufp + index * stride
   14092             :  *     if suboffset >= 0:             # <<<<<<<<<<<<<<
   14093             :  *         resultp = (<char **> resultp)[0] + suboffset
   14094             :  * 
   14095             :  */
   14096             :   }
   14097             : 
   14098             :   /* "View.MemoryView":923
   14099             :  *         resultp = (<char **> resultp)[0] + suboffset
   14100             :  * 
   14101             :  *     return resultp             # <<<<<<<<<<<<<<
   14102             :  * 
   14103             :  * 
   14104             :  */
   14105           0 :   __pyx_r = __pyx_v_resultp;
   14106           0 :   goto __pyx_L0;
   14107             : 
   14108             :   /* "View.MemoryView":896
   14109             :  * 
   14110             :  * @cname('__pyx_pybuffer_index')
   14111             :  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,             # <<<<<<<<<<<<<<
   14112             :  *                           Py_ssize_t dim) except NULL:
   14113             :  *     cdef Py_ssize_t shape, stride, suboffset = -1
   14114             :  */
   14115             : 
   14116             :   /* function exit code */
   14117           0 :   __pyx_L1_error:;
   14118           0 :   __Pyx_XDECREF(__pyx_t_3);
   14119           0 :   __Pyx_XDECREF(__pyx_t_5);
   14120           0 :   __Pyx_AddTraceback("View.MemoryView.pybuffer_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
   14121           0 :   __pyx_r = NULL;
   14122           0 :   __pyx_L0:;
   14123           0 :   __Pyx_RefNannyFinishContext();
   14124           0 :   return __pyx_r;
   14125             : }
   14126             : 
   14127             : /* "View.MemoryView":929
   14128             :  * 
   14129             :  * @cname('__pyx_memslice_transpose')
   14130             :  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil:             # <<<<<<<<<<<<<<
   14131             :  *     cdef int ndim = memslice.memview.view.ndim
   14132             :  * 
   14133             :  */
   14134             : 
   14135           0 : static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {
   14136           0 :   int __pyx_v_ndim;
   14137           0 :   Py_ssize_t *__pyx_v_shape;
   14138           0 :   Py_ssize_t *__pyx_v_strides;
   14139           0 :   int __pyx_v_i;
   14140           0 :   int __pyx_v_j;
   14141           0 :   int __pyx_r;
   14142           0 :   int __pyx_t_1;
   14143           0 :   Py_ssize_t *__pyx_t_2;
   14144           0 :   long __pyx_t_3;
   14145           0 :   long __pyx_t_4;
   14146           0 :   Py_ssize_t __pyx_t_5;
   14147           0 :   Py_ssize_t __pyx_t_6;
   14148           0 :   int __pyx_t_7;
   14149           0 :   int __pyx_t_8;
   14150           0 :   int __pyx_t_9;
   14151           0 :   int __pyx_lineno = 0;
   14152           0 :   const char *__pyx_filename = NULL;
   14153           0 :   int __pyx_clineno = 0;
   14154             :   #ifdef WITH_THREAD
   14155           0 :   PyGILState_STATE __pyx_gilstate_save;
   14156             :   #endif
   14157             : 
   14158             :   /* "View.MemoryView":930
   14159             :  * @cname('__pyx_memslice_transpose')
   14160             :  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil:
   14161             :  *     cdef int ndim = memslice.memview.view.ndim             # <<<<<<<<<<<<<<
   14162             :  * 
   14163             :  *     cdef Py_ssize_t *shape = memslice.shape
   14164             :  */
   14165           0 :   __pyx_t_1 = __pyx_v_memslice->memview->view.ndim;
   14166           0 :   __pyx_v_ndim = __pyx_t_1;
   14167             : 
   14168             :   /* "View.MemoryView":932
   14169             :  *     cdef int ndim = memslice.memview.view.ndim
   14170             :  * 
   14171             :  *     cdef Py_ssize_t *shape = memslice.shape             # <<<<<<<<<<<<<<
   14172             :  *     cdef Py_ssize_t *strides = memslice.strides
   14173             :  * 
   14174             :  */
   14175           0 :   __pyx_t_2 = __pyx_v_memslice->shape;
   14176           0 :   __pyx_v_shape = __pyx_t_2;
   14177             : 
   14178             :   /* "View.MemoryView":933
   14179             :  * 
   14180             :  *     cdef Py_ssize_t *shape = memslice.shape
   14181             :  *     cdef Py_ssize_t *strides = memslice.strides             # <<<<<<<<<<<<<<
   14182             :  * 
   14183             :  * 
   14184             :  */
   14185           0 :   __pyx_t_2 = __pyx_v_memslice->strides;
   14186           0 :   __pyx_v_strides = __pyx_t_2;
   14187             : 
   14188             :   /* "View.MemoryView":937
   14189             :  * 
   14190             :  *     cdef int i, j
   14191             :  *     for i in range(ndim // 2):             # <<<<<<<<<<<<<<
   14192             :  *         j = ndim - 1 - i
   14193             :  *         strides[i], strides[j] = strides[j], strides[i]
   14194             :  */
   14195           0 :   __pyx_t_3 = __Pyx_div_long(__pyx_v_ndim, 2);
   14196           0 :   __pyx_t_4 = __pyx_t_3;
   14197           0 :   for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_4; __pyx_t_1+=1) {
   14198           0 :     __pyx_v_i = __pyx_t_1;
   14199             : 
   14200             :     /* "View.MemoryView":938
   14201             :  *     cdef int i, j
   14202             :  *     for i in range(ndim // 2):
   14203             :  *         j = ndim - 1 - i             # <<<<<<<<<<<<<<
   14204             :  *         strides[i], strides[j] = strides[j], strides[i]
   14205             :  *         shape[i], shape[j] = shape[j], shape[i]
   14206             :  */
   14207           0 :     __pyx_v_j = ((__pyx_v_ndim - 1) - __pyx_v_i);
   14208             : 
   14209             :     /* "View.MemoryView":939
   14210             :  *     for i in range(ndim // 2):
   14211             :  *         j = ndim - 1 - i
   14212             :  *         strides[i], strides[j] = strides[j], strides[i]             # <<<<<<<<<<<<<<
   14213             :  *         shape[i], shape[j] = shape[j], shape[i]
   14214             :  * 
   14215             :  */
   14216           0 :     __pyx_t_5 = (__pyx_v_strides[__pyx_v_j]);
   14217           0 :     __pyx_t_6 = (__pyx_v_strides[__pyx_v_i]);
   14218           0 :     (__pyx_v_strides[__pyx_v_i]) = __pyx_t_5;
   14219           0 :     (__pyx_v_strides[__pyx_v_j]) = __pyx_t_6;
   14220             : 
   14221             :     /* "View.MemoryView":940
   14222             :  *         j = ndim - 1 - i
   14223             :  *         strides[i], strides[j] = strides[j], strides[i]
   14224             :  *         shape[i], shape[j] = shape[j], shape[i]             # <<<<<<<<<<<<<<
   14225             :  * 
   14226             :  *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
   14227             :  */
   14228           0 :     __pyx_t_6 = (__pyx_v_shape[__pyx_v_j]);
   14229           0 :     __pyx_t_5 = (__pyx_v_shape[__pyx_v_i]);
   14230           0 :     (__pyx_v_shape[__pyx_v_i]) = __pyx_t_6;
   14231           0 :     (__pyx_v_shape[__pyx_v_j]) = __pyx_t_5;
   14232             : 
   14233             :     /* "View.MemoryView":942
   14234             :  *         shape[i], shape[j] = shape[j], shape[i]
   14235             :  * 
   14236             :  *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:             # <<<<<<<<<<<<<<
   14237             :  *             _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions")
   14238             :  * 
   14239             :  */
   14240           0 :     __pyx_t_8 = ((__pyx_v_memslice->suboffsets[__pyx_v_i]) >= 0);
   14241           0 :     if (!__pyx_t_8) {
   14242           0 :     } else {
   14243           0 :       __pyx_t_7 = __pyx_t_8;
   14244           0 :       goto __pyx_L6_bool_binop_done;
   14245             :     }
   14246           0 :     __pyx_t_8 = ((__pyx_v_memslice->suboffsets[__pyx_v_j]) >= 0);
   14247           0 :     __pyx_t_7 = __pyx_t_8;
   14248           0 :     __pyx_L6_bool_binop_done:;
   14249           0 :     if (__pyx_t_7) {
   14250             : 
   14251             :       /* "View.MemoryView":943
   14252             :  * 
   14253             :  *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
   14254             :  *             _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions")             # <<<<<<<<<<<<<<
   14255             :  * 
   14256             :  *     return 0
   14257             :  */
   14258           0 :       __pyx_t_9 = __pyx_memoryview_err(PyExc_ValueError, __pyx_kp_s_Cannot_transpose_memoryview_with); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 943, __pyx_L1_error)
   14259             : 
   14260             :       /* "View.MemoryView":942
   14261             :  *         shape[i], shape[j] = shape[j], shape[i]
   14262             :  * 
   14263             :  *         if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:             # <<<<<<<<<<<<<<
   14264             :  *             _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions")
   14265             :  * 
   14266             :  */
   14267             :     }
   14268             :   }
   14269             : 
   14270             :   /* "View.MemoryView":945
   14271             :  *             _err(PyExc_ValueError, "Cannot transpose memoryview with indirect dimensions")
   14272             :  * 
   14273             :  *     return 0             # <<<<<<<<<<<<<<
   14274             :  * 
   14275             :  * 
   14276             :  */
   14277           0 :   __pyx_r = 0;
   14278           0 :   goto __pyx_L0;
   14279             : 
   14280             :   /* "View.MemoryView":929
   14281             :  * 
   14282             :  * @cname('__pyx_memslice_transpose')
   14283             :  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) except -1 nogil:             # <<<<<<<<<<<<<<
   14284             :  *     cdef int ndim = memslice.memview.view.ndim
   14285             :  * 
   14286             :  */
   14287             : 
   14288             :   /* function exit code */
   14289           0 :   __pyx_L1_error:;
   14290             :   #ifdef WITH_THREAD
   14291           0 :   __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   14292             :   #endif
   14293           0 :   __Pyx_AddTraceback("View.MemoryView.transpose_memslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
   14294           0 :   __pyx_r = -1;
   14295             :   #ifdef WITH_THREAD
   14296           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   14297             :   #endif
   14298           0 :   __pyx_L0:;
   14299           0 :   return __pyx_r;
   14300             : }
   14301             : 
   14302             : /* "View.MemoryView":963
   14303             :  *     cdef int (*to_dtype_func)(char *, object) except 0
   14304             :  * 
   14305             :  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
   14306             :  *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
   14307             :  * 
   14308             :  */
   14309             : 
   14310             : /* Python wrapper */
   14311             : static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self); /*proto*/
   14312           0 : static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self) {
   14313           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   14314             :   __Pyx_RefNannyDeclarations
   14315           0 :   __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
   14316           0 :   __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
   14317           0 :   __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
   14318             : 
   14319             :   /* function exit code */
   14320           0 :   __Pyx_RefNannyFinishContext();
   14321             : }
   14322             : 
   14323           0 : static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
   14324             : 
   14325             :   /* "View.MemoryView":964
   14326             :  * 
   14327             :  *     def __dealloc__(self):
   14328             :  *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)             # <<<<<<<<<<<<<<
   14329             :  * 
   14330             :  *     cdef convert_item_to_object(self, char *itemp):
   14331             :  */
   14332           0 :   __PYX_XCLEAR_MEMVIEW((&__pyx_v_self->from_slice), 1);
   14333             : 
   14334             :   /* "View.MemoryView":963
   14335             :  *     cdef int (*to_dtype_func)(char *, object) except 0
   14336             :  * 
   14337             :  *     def __dealloc__(self):             # <<<<<<<<<<<<<<
   14338             :  *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
   14339             :  * 
   14340             :  */
   14341             : 
   14342             :   /* function exit code */
   14343             : }
   14344             : 
   14345             : /* "View.MemoryView":966
   14346             :  *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
   14347             :  * 
   14348             :  *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
   14349             :  *         if self.to_object_func != NULL:
   14350             :  *             return self.to_object_func(itemp)
   14351             :  */
   14352             : 
   14353           0 : static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp) {
   14354           0 :   PyObject *__pyx_r = NULL;
   14355             :   __Pyx_RefNannyDeclarations
   14356           0 :   int __pyx_t_1;
   14357           0 :   PyObject *__pyx_t_2 = NULL;
   14358           0 :   int __pyx_lineno = 0;
   14359           0 :   const char *__pyx_filename = NULL;
   14360           0 :   int __pyx_clineno = 0;
   14361           0 :   __Pyx_RefNannySetupContext("convert_item_to_object", 1);
   14362             : 
   14363             :   /* "View.MemoryView":967
   14364             :  * 
   14365             :  *     cdef convert_item_to_object(self, char *itemp):
   14366             :  *         if self.to_object_func != NULL:             # <<<<<<<<<<<<<<
   14367             :  *             return self.to_object_func(itemp)
   14368             :  *         else:
   14369             :  */
   14370           0 :   __pyx_t_1 = (__pyx_v_self->to_object_func != NULL);
   14371           0 :   if (__pyx_t_1) {
   14372             : 
   14373             :     /* "View.MemoryView":968
   14374             :  *     cdef convert_item_to_object(self, char *itemp):
   14375             :  *         if self.to_object_func != NULL:
   14376             :  *             return self.to_object_func(itemp)             # <<<<<<<<<<<<<<
   14377             :  *         else:
   14378             :  *             return memoryview.convert_item_to_object(self, itemp)
   14379             :  */
   14380           0 :     __Pyx_XDECREF(__pyx_r);
   14381           0 :     __pyx_t_2 = __pyx_v_self->to_object_func(__pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 968, __pyx_L1_error)
   14382           0 :     __Pyx_GOTREF(__pyx_t_2);
   14383           0 :     __pyx_r = __pyx_t_2;
   14384           0 :     __pyx_t_2 = 0;
   14385           0 :     goto __pyx_L0;
   14386             : 
   14387             :     /* "View.MemoryView":967
   14388             :  * 
   14389             :  *     cdef convert_item_to_object(self, char *itemp):
   14390             :  *         if self.to_object_func != NULL:             # <<<<<<<<<<<<<<
   14391             :  *             return self.to_object_func(itemp)
   14392             :  *         else:
   14393             :  */
   14394             :   }
   14395             : 
   14396             :   /* "View.MemoryView":970
   14397             :  *             return self.to_object_func(itemp)
   14398             :  *         else:
   14399             :  *             return memoryview.convert_item_to_object(self, itemp)             # <<<<<<<<<<<<<<
   14400             :  * 
   14401             :  *     cdef assign_item_from_object(self, char *itemp, object value):
   14402             :  */
   14403             :   /*else*/ {
   14404           0 :     __Pyx_XDECREF(__pyx_r);
   14405           0 :     __pyx_t_2 = __pyx_memoryview_convert_item_to_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 970, __pyx_L1_error)
   14406           0 :     __Pyx_GOTREF(__pyx_t_2);
   14407           0 :     __pyx_r = __pyx_t_2;
   14408           0 :     __pyx_t_2 = 0;
   14409           0 :     goto __pyx_L0;
   14410             :   }
   14411             : 
   14412             :   /* "View.MemoryView":966
   14413             :  *         __PYX_XCLEAR_MEMVIEW(&self.from_slice, 1)
   14414             :  * 
   14415             :  *     cdef convert_item_to_object(self, char *itemp):             # <<<<<<<<<<<<<<
   14416             :  *         if self.to_object_func != NULL:
   14417             :  *             return self.to_object_func(itemp)
   14418             :  */
   14419             : 
   14420             :   /* function exit code */
   14421           0 :   __pyx_L1_error:;
   14422           0 :   __Pyx_XDECREF(__pyx_t_2);
   14423           0 :   __Pyx_AddTraceback("View.MemoryView._memoryviewslice.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
   14424           0 :   __pyx_r = 0;
   14425           0 :   __pyx_L0:;
   14426           0 :   __Pyx_XGIVEREF(__pyx_r);
   14427           0 :   __Pyx_RefNannyFinishContext();
   14428           0 :   return __pyx_r;
   14429             : }
   14430             : 
   14431             : /* "View.MemoryView":972
   14432             :  *             return memoryview.convert_item_to_object(self, itemp)
   14433             :  * 
   14434             :  *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
   14435             :  *         if self.to_dtype_func != NULL:
   14436             :  *             self.to_dtype_func(itemp, value)
   14437             :  */
   14438             : 
   14439           0 : static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
   14440           0 :   PyObject *__pyx_r = NULL;
   14441             :   __Pyx_RefNannyDeclarations
   14442           0 :   int __pyx_t_1;
   14443           0 :   int __pyx_t_2;
   14444           0 :   PyObject *__pyx_t_3 = NULL;
   14445           0 :   int __pyx_lineno = 0;
   14446           0 :   const char *__pyx_filename = NULL;
   14447           0 :   int __pyx_clineno = 0;
   14448           0 :   __Pyx_RefNannySetupContext("assign_item_from_object", 1);
   14449             : 
   14450             :   /* "View.MemoryView":973
   14451             :  * 
   14452             :  *     cdef assign_item_from_object(self, char *itemp, object value):
   14453             :  *         if self.to_dtype_func != NULL:             # <<<<<<<<<<<<<<
   14454             :  *             self.to_dtype_func(itemp, value)
   14455             :  *         else:
   14456             :  */
   14457           0 :   __pyx_t_1 = (__pyx_v_self->to_dtype_func != NULL);
   14458           0 :   if (__pyx_t_1) {
   14459             : 
   14460             :     /* "View.MemoryView":974
   14461             :  *     cdef assign_item_from_object(self, char *itemp, object value):
   14462             :  *         if self.to_dtype_func != NULL:
   14463             :  *             self.to_dtype_func(itemp, value)             # <<<<<<<<<<<<<<
   14464             :  *         else:
   14465             :  *             memoryview.assign_item_from_object(self, itemp, value)
   14466             :  */
   14467           0 :     __pyx_t_2 = __pyx_v_self->to_dtype_func(__pyx_v_itemp, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 974, __pyx_L1_error)
   14468             : 
   14469             :     /* "View.MemoryView":973
   14470             :  * 
   14471             :  *     cdef assign_item_from_object(self, char *itemp, object value):
   14472             :  *         if self.to_dtype_func != NULL:             # <<<<<<<<<<<<<<
   14473             :  *             self.to_dtype_func(itemp, value)
   14474             :  *         else:
   14475             :  */
   14476           0 :     goto __pyx_L3;
   14477             :   }
   14478             : 
   14479             :   /* "View.MemoryView":976
   14480             :  *             self.to_dtype_func(itemp, value)
   14481             :  *         else:
   14482             :  *             memoryview.assign_item_from_object(self, itemp, value)             # <<<<<<<<<<<<<<
   14483             :  * 
   14484             :  *     cdef _get_base(self):
   14485             :  */
   14486             :   /*else*/ {
   14487           0 :     __pyx_t_3 = __pyx_memoryview_assign_item_from_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 976, __pyx_L1_error)
   14488           0 :     __Pyx_GOTREF(__pyx_t_3);
   14489           0 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   14490             :   }
   14491           0 :   __pyx_L3:;
   14492             : 
   14493             :   /* "View.MemoryView":972
   14494             :  *             return memoryview.convert_item_to_object(self, itemp)
   14495             :  * 
   14496             :  *     cdef assign_item_from_object(self, char *itemp, object value):             # <<<<<<<<<<<<<<
   14497             :  *         if self.to_dtype_func != NULL:
   14498             :  *             self.to_dtype_func(itemp, value)
   14499             :  */
   14500             : 
   14501             :   /* function exit code */
   14502           0 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   14503           0 :   goto __pyx_L0;
   14504           0 :   __pyx_L1_error:;
   14505           0 :   __Pyx_XDECREF(__pyx_t_3);
   14506           0 :   __Pyx_AddTraceback("View.MemoryView._memoryviewslice.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
   14507           0 :   __pyx_r = 0;
   14508           0 :   __pyx_L0:;
   14509           0 :   __Pyx_XGIVEREF(__pyx_r);
   14510           0 :   __Pyx_RefNannyFinishContext();
   14511           0 :   return __pyx_r;
   14512             : }
   14513             : 
   14514             : /* "View.MemoryView":978
   14515             :  *             memoryview.assign_item_from_object(self, itemp, value)
   14516             :  * 
   14517             :  *     cdef _get_base(self):             # <<<<<<<<<<<<<<
   14518             :  *         return self.from_object
   14519             :  * 
   14520             :  */
   14521             : 
   14522           0 : static PyObject *__pyx_memoryviewslice__get_base(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
   14523           0 :   PyObject *__pyx_r = NULL;
   14524             :   __Pyx_RefNannyDeclarations
   14525           0 :   __Pyx_RefNannySetupContext("_get_base", 1);
   14526             : 
   14527             :   /* "View.MemoryView":979
   14528             :  * 
   14529             :  *     cdef _get_base(self):
   14530             :  *         return self.from_object             # <<<<<<<<<<<<<<
   14531             :  * 
   14532             :  * 
   14533             :  */
   14534           0 :   __Pyx_XDECREF(__pyx_r);
   14535           0 :   __Pyx_INCREF(__pyx_v_self->from_object);
   14536           0 :   __pyx_r = __pyx_v_self->from_object;
   14537           0 :   goto __pyx_L0;
   14538             : 
   14539             :   /* "View.MemoryView":978
   14540             :  *             memoryview.assign_item_from_object(self, itemp, value)
   14541             :  * 
   14542             :  *     cdef _get_base(self):             # <<<<<<<<<<<<<<
   14543             :  *         return self.from_object
   14544             :  * 
   14545             :  */
   14546             : 
   14547             :   /* function exit code */
   14548           0 :   __pyx_L0:;
   14549           0 :   __Pyx_XGIVEREF(__pyx_r);
   14550           0 :   __Pyx_RefNannyFinishContext();
   14551           0 :   return __pyx_r;
   14552             : }
   14553             : 
   14554             : /* "(tree fragment)":1
   14555             :  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
   14556             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   14557             :  * def __setstate_cython__(self, __pyx_state):
   14558             :  */
   14559             : 
   14560             : /* Python wrapper */
   14561             : static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, 
   14562             : #if CYTHON_METH_FASTCALL
   14563             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   14564             : #else
   14565             : PyObject *__pyx_args, PyObject *__pyx_kwds
   14566             : #endif
   14567             : ); /*proto*/
   14568           0 : static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, 
   14569             : #if CYTHON_METH_FASTCALL
   14570             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   14571             : #else
   14572             : PyObject *__pyx_args, PyObject *__pyx_kwds
   14573             : #endif
   14574             : ) {
   14575             :   #if !CYTHON_METH_FASTCALL
   14576             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   14577             :   #endif
   14578           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   14579           0 :   PyObject *__pyx_r = 0;
   14580             :   __Pyx_RefNannyDeclarations
   14581           0 :   __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
   14582             :   #if !CYTHON_METH_FASTCALL
   14583             :   #if CYTHON_ASSUME_SAFE_MACROS
   14584             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   14585             :   #else
   14586             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   14587             :   #endif
   14588             :   #endif
   14589           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   14590           0 :   if (unlikely(__pyx_nargs > 0)) {
   14591           0 :     __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
   14592           0 :   if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
   14593           0 :   __pyx_r = __pyx_pf___pyx_memoryviewslice___reduce_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
   14594             : 
   14595             :   /* function exit code */
   14596           0 :   __Pyx_RefNannyFinishContext();
   14597           0 :   return __pyx_r;
   14598             : }
   14599             : 
   14600           0 : static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self) {
   14601           0 :   PyObject *__pyx_r = NULL;
   14602             :   __Pyx_RefNannyDeclarations
   14603           0 :   int __pyx_lineno = 0;
   14604           0 :   const char *__pyx_filename = NULL;
   14605           0 :   int __pyx_clineno = 0;
   14606           0 :   __Pyx_RefNannySetupContext("__reduce_cython__", 1);
   14607             : 
   14608             :   /* "(tree fragment)":2
   14609             :  * def __reduce_cython__(self):
   14610             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
   14611             :  * def __setstate_cython__(self, __pyx_state):
   14612             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   14613             :  */
   14614           0 :   __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
   14615           0 :   __PYX_ERR(1, 2, __pyx_L1_error)
   14616             : 
   14617             :   /* "(tree fragment)":1
   14618             :  * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
   14619             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   14620             :  * def __setstate_cython__(self, __pyx_state):
   14621             :  */
   14622             : 
   14623             :   /* function exit code */
   14624           0 :   __pyx_L1_error:;
   14625           0 :   __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   14626           0 :   __pyx_r = NULL;
   14627           0 :   __Pyx_XGIVEREF(__pyx_r);
   14628           0 :   __Pyx_RefNannyFinishContext();
   14629           0 :   return __pyx_r;
   14630             : }
   14631             : 
   14632             : /* "(tree fragment)":3
   14633             :  * def __reduce_cython__(self):
   14634             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   14635             :  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
   14636             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   14637             :  */
   14638             : 
   14639             : /* Python wrapper */
   14640             : static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, 
   14641             : #if CYTHON_METH_FASTCALL
   14642             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   14643             : #else
   14644             : PyObject *__pyx_args, PyObject *__pyx_kwds
   14645             : #endif
   14646             : ); /*proto*/
   14647           0 : static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, 
   14648             : #if CYTHON_METH_FASTCALL
   14649             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   14650             : #else
   14651             : PyObject *__pyx_args, PyObject *__pyx_kwds
   14652             : #endif
   14653             : ) {
   14654           0 :   CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
   14655             :   #if !CYTHON_METH_FASTCALL
   14656             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   14657             :   #endif
   14658           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   14659           0 :   PyObject* values[1] = {0};
   14660           0 :   int __pyx_lineno = 0;
   14661           0 :   const char *__pyx_filename = NULL;
   14662           0 :   int __pyx_clineno = 0;
   14663           0 :   PyObject *__pyx_r = 0;
   14664             :   __Pyx_RefNannyDeclarations
   14665           0 :   __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
   14666             :   #if !CYTHON_METH_FASTCALL
   14667             :   #if CYTHON_ASSUME_SAFE_MACROS
   14668             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   14669             :   #else
   14670             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   14671             :   #endif
   14672             :   #endif
   14673           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   14674             :   {
   14675           0 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
   14676           0 :     if (__pyx_kwds) {
   14677           0 :       Py_ssize_t kw_args;
   14678           0 :       switch (__pyx_nargs) {
   14679           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   14680           0 :         CYTHON_FALLTHROUGH;
   14681           0 :         case  0: break;
   14682           0 :         default: goto __pyx_L5_argtuple_error;
   14683             :       }
   14684           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   14685           0 :       switch (__pyx_nargs) {
   14686             :         case  0:
   14687           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
   14688           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   14689           0 :           kw_args--;
   14690             :         }
   14691           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
   14692           0 :         else goto __pyx_L5_argtuple_error;
   14693             :       }
   14694           0 :       if (unlikely(kw_args > 0)) {
   14695           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   14696           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
   14697             :       }
   14698           0 :     } else if (unlikely(__pyx_nargs != 1)) {
   14699           0 :       goto __pyx_L5_argtuple_error;
   14700             :     } else {
   14701           0 :       values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   14702             :     }
   14703           0 :     __pyx_v___pyx_state = values[0];
   14704             :   }
   14705           0 :   goto __pyx_L6_skip;
   14706           0 :   __pyx_L5_argtuple_error:;
   14707           0 :   __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
   14708           0 :   __pyx_L6_skip:;
   14709           0 :   goto __pyx_L4_argument_unpacking_done;
   14710           0 :   __pyx_L3_error:;
   14711             :   {
   14712           0 :     Py_ssize_t __pyx_temp;
   14713           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   14714             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   14715             :     }
   14716             :   }
   14717           0 :   __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   14718           0 :   __Pyx_RefNannyFinishContext();
   14719           0 :   return NULL;
   14720           0 :   __pyx_L4_argument_unpacking_done:;
   14721           0 :   __pyx_r = __pyx_pf___pyx_memoryviewslice_2__setstate_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self), __pyx_v___pyx_state);
   14722             : 
   14723             :   /* function exit code */
   14724             :   {
   14725           0 :     Py_ssize_t __pyx_temp;
   14726           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   14727             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   14728             :     }
   14729             :   }
   14730             :   __Pyx_RefNannyFinishContext();
   14731             :   return __pyx_r;
   14732             : }
   14733             : 
   14734           0 : static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
   14735           0 :   PyObject *__pyx_r = NULL;
   14736             :   __Pyx_RefNannyDeclarations
   14737           0 :   int __pyx_lineno = 0;
   14738           0 :   const char *__pyx_filename = NULL;
   14739           0 :   int __pyx_clineno = 0;
   14740           0 :   __Pyx_RefNannySetupContext("__setstate_cython__", 1);
   14741             : 
   14742             :   /* "(tree fragment)":4
   14743             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   14744             :  * def __setstate_cython__(self, __pyx_state):
   14745             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"             # <<<<<<<<<<<<<<
   14746             :  */
   14747           0 :   __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
   14748           0 :   __PYX_ERR(1, 4, __pyx_L1_error)
   14749             : 
   14750             :   /* "(tree fragment)":3
   14751             :  * def __reduce_cython__(self):
   14752             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   14753             :  * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
   14754             :  *     raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
   14755             :  */
   14756             : 
   14757             :   /* function exit code */
   14758           0 :   __pyx_L1_error:;
   14759           0 :   __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
   14760           0 :   __pyx_r = NULL;
   14761           0 :   __Pyx_XGIVEREF(__pyx_r);
   14762           0 :   __Pyx_RefNannyFinishContext();
   14763           0 :   return __pyx_r;
   14764             : }
   14765             : 
   14766             : /* "View.MemoryView":999
   14767             :  * 
   14768             :  * @cname('__pyx_memoryview_fromslice')
   14769             :  * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice,             # <<<<<<<<<<<<<<
   14770             :  *                           int ndim,
   14771             :  *                           object (*to_object_func)(char *),
   14772             :  */
   14773             : 
   14774           0 : static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewslice, int __pyx_v_ndim, PyObject *(*__pyx_v_to_object_func)(char *), int (*__pyx_v_to_dtype_func)(char *, PyObject *), int __pyx_v_dtype_is_object) {
   14775           0 :   struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
   14776           0 :   Py_ssize_t __pyx_v_suboffset;
   14777           0 :   PyObject *__pyx_v_length = NULL;
   14778           0 :   PyObject *__pyx_r = NULL;
   14779             :   __Pyx_RefNannyDeclarations
   14780           0 :   int __pyx_t_1;
   14781           0 :   PyObject *__pyx_t_2 = NULL;
   14782           0 :   PyObject *__pyx_t_3 = NULL;
   14783           0 :   __Pyx_TypeInfo *__pyx_t_4;
   14784           0 :   Py_buffer __pyx_t_5;
   14785           0 :   Py_ssize_t *__pyx_t_6;
   14786           0 :   Py_ssize_t *__pyx_t_7;
   14787           0 :   Py_ssize_t *__pyx_t_8;
   14788           0 :   Py_ssize_t __pyx_t_9;
   14789           0 :   int __pyx_lineno = 0;
   14790           0 :   const char *__pyx_filename = NULL;
   14791           0 :   int __pyx_clineno = 0;
   14792           0 :   __Pyx_RefNannySetupContext("memoryview_fromslice", 1);
   14793             : 
   14794             :   /* "View.MemoryView":1007
   14795             :  *     cdef _memoryviewslice result
   14796             :  * 
   14797             :  *     if <PyObject *> memviewslice.memview == Py_None:             # <<<<<<<<<<<<<<
   14798             :  *         return None
   14799             :  * 
   14800             :  */
   14801           0 :   __pyx_t_1 = (((PyObject *)__pyx_v_memviewslice.memview) == Py_None);
   14802           0 :   if (__pyx_t_1) {
   14803             : 
   14804             :     /* "View.MemoryView":1008
   14805             :  * 
   14806             :  *     if <PyObject *> memviewslice.memview == Py_None:
   14807             :  *         return None             # <<<<<<<<<<<<<<
   14808             :  * 
   14809             :  * 
   14810             :  */
   14811           0 :     __Pyx_XDECREF(__pyx_r);
   14812           0 :     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   14813           0 :     goto __pyx_L0;
   14814             : 
   14815             :     /* "View.MemoryView":1007
   14816             :  *     cdef _memoryviewslice result
   14817             :  * 
   14818             :  *     if <PyObject *> memviewslice.memview == Py_None:             # <<<<<<<<<<<<<<
   14819             :  *         return None
   14820             :  * 
   14821             :  */
   14822             :   }
   14823             : 
   14824             :   /* "View.MemoryView":1013
   14825             :  * 
   14826             :  * 
   14827             :  *     result = _memoryviewslice.__new__(_memoryviewslice, None, 0, dtype_is_object)             # <<<<<<<<<<<<<<
   14828             :  * 
   14829             :  *     result.from_slice = memviewslice
   14830             :  */
   14831           0 :   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1013, __pyx_L1_error)
   14832           0 :   __Pyx_GOTREF(__pyx_t_2);
   14833           0 :   __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1013, __pyx_L1_error)
   14834           0 :   __Pyx_GOTREF(__pyx_t_3);
   14835           0 :   __Pyx_INCREF(Py_None);
   14836           0 :   __Pyx_GIVEREF(Py_None);
   14837           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None)) __PYX_ERR(1, 1013, __pyx_L1_error);
   14838           0 :   __Pyx_INCREF(__pyx_int_0);
   14839           0 :   __Pyx_GIVEREF(__pyx_int_0);
   14840           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0)) __PYX_ERR(1, 1013, __pyx_L1_error);
   14841           0 :   __Pyx_GIVEREF(__pyx_t_2);
   14842           0 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2)) __PYX_ERR(1, 1013, __pyx_L1_error);
   14843           0 :   __pyx_t_2 = 0;
   14844           0 :   __pyx_t_2 = ((PyObject *)__pyx_tp_new__memoryviewslice(((PyTypeObject *)__pyx_memoryviewslice_type), __pyx_t_3, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1013, __pyx_L1_error)
   14845           0 :   __Pyx_GOTREF((PyObject *)__pyx_t_2);
   14846           0 :   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   14847           0 :   __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
   14848           0 :   __pyx_t_2 = 0;
   14849             : 
   14850             :   /* "View.MemoryView":1015
   14851             :  *     result = _memoryviewslice.__new__(_memoryviewslice, None, 0, dtype_is_object)
   14852             :  * 
   14853             :  *     result.from_slice = memviewslice             # <<<<<<<<<<<<<<
   14854             :  *     __PYX_INC_MEMVIEW(&memviewslice, 1)
   14855             :  * 
   14856             :  */
   14857           0 :   __pyx_v_result->from_slice = __pyx_v_memviewslice;
   14858             : 
   14859             :   /* "View.MemoryView":1016
   14860             :  * 
   14861             :  *     result.from_slice = memviewslice
   14862             :  *     __PYX_INC_MEMVIEW(&memviewslice, 1)             # <<<<<<<<<<<<<<
   14863             :  * 
   14864             :  *     result.from_object = (<memoryview> memviewslice.memview)._get_base()
   14865             :  */
   14866           0 :   __PYX_INC_MEMVIEW((&__pyx_v_memviewslice), 1);
   14867             : 
   14868             :   /* "View.MemoryView":1018
   14869             :  *     __PYX_INC_MEMVIEW(&memviewslice, 1)
   14870             :  * 
   14871             :  *     result.from_object = (<memoryview> memviewslice.memview)._get_base()             # <<<<<<<<<<<<<<
   14872             :  *     result.typeinfo = memviewslice.memview.typeinfo
   14873             :  * 
   14874             :  */
   14875           0 :   __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->__pyx_vtab)->_get_base(((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1018, __pyx_L1_error)
   14876           0 :   __Pyx_GOTREF(__pyx_t_2);
   14877           0 :   __Pyx_GIVEREF(__pyx_t_2);
   14878           0 :   __Pyx_GOTREF(__pyx_v_result->from_object);
   14879           0 :   __Pyx_DECREF(__pyx_v_result->from_object);
   14880           0 :   __pyx_v_result->from_object = __pyx_t_2;
   14881           0 :   __pyx_t_2 = 0;
   14882             : 
   14883             :   /* "View.MemoryView":1019
   14884             :  * 
   14885             :  *     result.from_object = (<memoryview> memviewslice.memview)._get_base()
   14886             :  *     result.typeinfo = memviewslice.memview.typeinfo             # <<<<<<<<<<<<<<
   14887             :  * 
   14888             :  *     result.view = memviewslice.memview.view
   14889             :  */
   14890           0 :   __pyx_t_4 = __pyx_v_memviewslice.memview->typeinfo;
   14891           0 :   __pyx_v_result->__pyx_base.typeinfo = __pyx_t_4;
   14892             : 
   14893             :   /* "View.MemoryView":1021
   14894             :  *     result.typeinfo = memviewslice.memview.typeinfo
   14895             :  * 
   14896             :  *     result.view = memviewslice.memview.view             # <<<<<<<<<<<<<<
   14897             :  *     result.view.buf = <void *> memviewslice.data
   14898             :  *     result.view.ndim = ndim
   14899             :  */
   14900           0 :   __pyx_t_5 = __pyx_v_memviewslice.memview->view;
   14901           0 :   __pyx_v_result->__pyx_base.view = __pyx_t_5;
   14902             : 
   14903             :   /* "View.MemoryView":1022
   14904             :  * 
   14905             :  *     result.view = memviewslice.memview.view
   14906             :  *     result.view.buf = <void *> memviewslice.data             # <<<<<<<<<<<<<<
   14907             :  *     result.view.ndim = ndim
   14908             :  *     (<__pyx_buffer *> &result.view).obj = Py_None
   14909             :  */
   14910           0 :   __pyx_v_result->__pyx_base.view.buf = ((void *)__pyx_v_memviewslice.data);
   14911             : 
   14912             :   /* "View.MemoryView":1023
   14913             :  *     result.view = memviewslice.memview.view
   14914             :  *     result.view.buf = <void *> memviewslice.data
   14915             :  *     result.view.ndim = ndim             # <<<<<<<<<<<<<<
   14916             :  *     (<__pyx_buffer *> &result.view).obj = Py_None
   14917             :  *     Py_INCREF(Py_None)
   14918             :  */
   14919           0 :   __pyx_v_result->__pyx_base.view.ndim = __pyx_v_ndim;
   14920             : 
   14921             :   /* "View.MemoryView":1024
   14922             :  *     result.view.buf = <void *> memviewslice.data
   14923             :  *     result.view.ndim = ndim
   14924             :  *     (<__pyx_buffer *> &result.view).obj = Py_None             # <<<<<<<<<<<<<<
   14925             :  *     Py_INCREF(Py_None)
   14926             :  * 
   14927             :  */
   14928           0 :   ((Py_buffer *)(&__pyx_v_result->__pyx_base.view))->obj = Py_None;
   14929             : 
   14930             :   /* "View.MemoryView":1025
   14931             :  *     result.view.ndim = ndim
   14932             :  *     (<__pyx_buffer *> &result.view).obj = Py_None
   14933             :  *     Py_INCREF(Py_None)             # <<<<<<<<<<<<<<
   14934             :  * 
   14935             :  *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
   14936             :  */
   14937           0 :   Py_INCREF(Py_None);
   14938             : 
   14939             :   /* "View.MemoryView":1027
   14940             :  *     Py_INCREF(Py_None)
   14941             :  * 
   14942             :  *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:             # <<<<<<<<<<<<<<
   14943             :  *         result.flags = PyBUF_RECORDS
   14944             :  *     else:
   14945             :  */
   14946           0 :   __pyx_t_1 = ((((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->flags & PyBUF_WRITABLE) != 0);
   14947           0 :   if (__pyx_t_1) {
   14948             : 
   14949             :     /* "View.MemoryView":1028
   14950             :  * 
   14951             :  *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
   14952             :  *         result.flags = PyBUF_RECORDS             # <<<<<<<<<<<<<<
   14953             :  *     else:
   14954             :  *         result.flags = PyBUF_RECORDS_RO
   14955             :  */
   14956           0 :     __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS;
   14957             : 
   14958             :     /* "View.MemoryView":1027
   14959             :  *     Py_INCREF(Py_None)
   14960             :  * 
   14961             :  *     if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:             # <<<<<<<<<<<<<<
   14962             :  *         result.flags = PyBUF_RECORDS
   14963             :  *     else:
   14964             :  */
   14965           0 :     goto __pyx_L4;
   14966             :   }
   14967             : 
   14968             :   /* "View.MemoryView":1030
   14969             :  *         result.flags = PyBUF_RECORDS
   14970             :  *     else:
   14971             :  *         result.flags = PyBUF_RECORDS_RO             # <<<<<<<<<<<<<<
   14972             :  * 
   14973             :  *     result.view.shape = <Py_ssize_t *> result.from_slice.shape
   14974             :  */
   14975             :   /*else*/ {
   14976           0 :     __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS_RO;
   14977             :   }
   14978           0 :   __pyx_L4:;
   14979             : 
   14980             :   /* "View.MemoryView":1032
   14981             :  *         result.flags = PyBUF_RECORDS_RO
   14982             :  * 
   14983             :  *     result.view.shape = <Py_ssize_t *> result.from_slice.shape             # <<<<<<<<<<<<<<
   14984             :  *     result.view.strides = <Py_ssize_t *> result.from_slice.strides
   14985             :  * 
   14986             :  */
   14987           0 :   __pyx_v_result->__pyx_base.view.shape = ((Py_ssize_t *)__pyx_v_result->from_slice.shape);
   14988             : 
   14989             :   /* "View.MemoryView":1033
   14990             :  * 
   14991             :  *     result.view.shape = <Py_ssize_t *> result.from_slice.shape
   14992             :  *     result.view.strides = <Py_ssize_t *> result.from_slice.strides             # <<<<<<<<<<<<<<
   14993             :  * 
   14994             :  * 
   14995             :  */
   14996           0 :   __pyx_v_result->__pyx_base.view.strides = ((Py_ssize_t *)__pyx_v_result->from_slice.strides);
   14997             : 
   14998             :   /* "View.MemoryView":1036
   14999             :  * 
   15000             :  * 
   15001             :  *     result.view.suboffsets = NULL             # <<<<<<<<<<<<<<
   15002             :  *     for suboffset in result.from_slice.suboffsets[:ndim]:
   15003             :  *         if suboffset >= 0:
   15004             :  */
   15005           0 :   __pyx_v_result->__pyx_base.view.suboffsets = NULL;
   15006             : 
   15007             :   /* "View.MemoryView":1037
   15008             :  * 
   15009             :  *     result.view.suboffsets = NULL
   15010             :  *     for suboffset in result.from_slice.suboffsets[:ndim]:             # <<<<<<<<<<<<<<
   15011             :  *         if suboffset >= 0:
   15012             :  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
   15013             :  */
   15014           0 :   __pyx_t_7 = (__pyx_v_result->from_slice.suboffsets + __pyx_v_ndim);
   15015           0 :   for (__pyx_t_8 = __pyx_v_result->from_slice.suboffsets; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
   15016           0 :     __pyx_t_6 = __pyx_t_8;
   15017           0 :     __pyx_v_suboffset = (__pyx_t_6[0]);
   15018             : 
   15019             :     /* "View.MemoryView":1038
   15020             :  *     result.view.suboffsets = NULL
   15021             :  *     for suboffset in result.from_slice.suboffsets[:ndim]:
   15022             :  *         if suboffset >= 0:             # <<<<<<<<<<<<<<
   15023             :  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
   15024             :  *             break
   15025             :  */
   15026           0 :     __pyx_t_1 = (__pyx_v_suboffset >= 0);
   15027           0 :     if (__pyx_t_1) {
   15028             : 
   15029             :       /* "View.MemoryView":1039
   15030             :  *     for suboffset in result.from_slice.suboffsets[:ndim]:
   15031             :  *         if suboffset >= 0:
   15032             :  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets             # <<<<<<<<<<<<<<
   15033             :  *             break
   15034             :  * 
   15035             :  */
   15036           0 :       __pyx_v_result->__pyx_base.view.suboffsets = ((Py_ssize_t *)__pyx_v_result->from_slice.suboffsets);
   15037             : 
   15038             :       /* "View.MemoryView":1040
   15039             :  *         if suboffset >= 0:
   15040             :  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
   15041             :  *             break             # <<<<<<<<<<<<<<
   15042             :  * 
   15043             :  *     result.view.len = result.view.itemsize
   15044             :  */
   15045           0 :       goto __pyx_L6_break;
   15046             : 
   15047             :       /* "View.MemoryView":1038
   15048             :  *     result.view.suboffsets = NULL
   15049             :  *     for suboffset in result.from_slice.suboffsets[:ndim]:
   15050             :  *         if suboffset >= 0:             # <<<<<<<<<<<<<<
   15051             :  *             result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
   15052             :  *             break
   15053             :  */
   15054             :     }
   15055             :   }
   15056           0 :   __pyx_L6_break:;
   15057             : 
   15058             :   /* "View.MemoryView":1042
   15059             :  *             break
   15060             :  * 
   15061             :  *     result.view.len = result.view.itemsize             # <<<<<<<<<<<<<<
   15062             :  *     for length in result.view.shape[:ndim]:
   15063             :  *         result.view.len *= length
   15064             :  */
   15065           0 :   __pyx_t_9 = __pyx_v_result->__pyx_base.view.itemsize;
   15066           0 :   __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
   15067             : 
   15068             :   /* "View.MemoryView":1043
   15069             :  * 
   15070             :  *     result.view.len = result.view.itemsize
   15071             :  *     for length in result.view.shape[:ndim]:             # <<<<<<<<<<<<<<
   15072             :  *         result.view.len *= length
   15073             :  * 
   15074             :  */
   15075           0 :   __pyx_t_7 = (__pyx_v_result->__pyx_base.view.shape + __pyx_v_ndim);
   15076           0 :   for (__pyx_t_8 = __pyx_v_result->__pyx_base.view.shape; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
   15077           0 :     __pyx_t_6 = __pyx_t_8;
   15078           0 :     __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_6[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1043, __pyx_L1_error)
   15079           0 :     __Pyx_GOTREF(__pyx_t_2);
   15080           0 :     __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_2);
   15081           0 :     __pyx_t_2 = 0;
   15082             : 
   15083             :     /* "View.MemoryView":1044
   15084             :  *     result.view.len = result.view.itemsize
   15085             :  *     for length in result.view.shape[:ndim]:
   15086             :  *         result.view.len *= length             # <<<<<<<<<<<<<<
   15087             :  * 
   15088             :  *     result.to_object_func = to_object_func
   15089             :  */
   15090           0 :     __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_result->__pyx_base.view.len); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1044, __pyx_L1_error)
   15091           0 :     __Pyx_GOTREF(__pyx_t_2);
   15092           0 :     __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1044, __pyx_L1_error)
   15093           0 :     __Pyx_GOTREF(__pyx_t_3);
   15094           0 :     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   15095           0 :     __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 1044, __pyx_L1_error)
   15096           0 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   15097           0 :     __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
   15098             :   }
   15099             : 
   15100             :   /* "View.MemoryView":1046
   15101             :  *         result.view.len *= length
   15102             :  * 
   15103             :  *     result.to_object_func = to_object_func             # <<<<<<<<<<<<<<
   15104             :  *     result.to_dtype_func = to_dtype_func
   15105             :  * 
   15106             :  */
   15107           0 :   __pyx_v_result->to_object_func = __pyx_v_to_object_func;
   15108             : 
   15109             :   /* "View.MemoryView":1047
   15110             :  * 
   15111             :  *     result.to_object_func = to_object_func
   15112             :  *     result.to_dtype_func = to_dtype_func             # <<<<<<<<<<<<<<
   15113             :  * 
   15114             :  *     return result
   15115             :  */
   15116           0 :   __pyx_v_result->to_dtype_func = __pyx_v_to_dtype_func;
   15117             : 
   15118             :   /* "View.MemoryView":1049
   15119             :  *     result.to_dtype_func = to_dtype_func
   15120             :  * 
   15121             :  *     return result             # <<<<<<<<<<<<<<
   15122             :  * 
   15123             :  * @cname('__pyx_memoryview_get_slice_from_memoryview')
   15124             :  */
   15125           0 :   __Pyx_XDECREF(__pyx_r);
   15126           0 :   __Pyx_INCREF((PyObject *)__pyx_v_result);
   15127           0 :   __pyx_r = ((PyObject *)__pyx_v_result);
   15128           0 :   goto __pyx_L0;
   15129             : 
   15130             :   /* "View.MemoryView":999
   15131             :  * 
   15132             :  * @cname('__pyx_memoryview_fromslice')
   15133             :  * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice,             # <<<<<<<<<<<<<<
   15134             :  *                           int ndim,
   15135             :  *                           object (*to_object_func)(char *),
   15136             :  */
   15137             : 
   15138             :   /* function exit code */
   15139           0 :   __pyx_L1_error:;
   15140           0 :   __Pyx_XDECREF(__pyx_t_2);
   15141           0 :   __Pyx_XDECREF(__pyx_t_3);
   15142           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview_fromslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
   15143           0 :   __pyx_r = 0;
   15144           0 :   __pyx_L0:;
   15145           0 :   __Pyx_XDECREF((PyObject *)__pyx_v_result);
   15146           0 :   __Pyx_XDECREF(__pyx_v_length);
   15147           0 :   __Pyx_XGIVEREF(__pyx_r);
   15148           0 :   __Pyx_RefNannyFinishContext();
   15149           0 :   return __pyx_r;
   15150             : }
   15151             : 
   15152             : /* "View.MemoryView":1052
   15153             :  * 
   15154             :  * @cname('__pyx_memoryview_get_slice_from_memoryview')
   15155             :  * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview,             # <<<<<<<<<<<<<<
   15156             :  *                                                    __Pyx_memviewslice *mslice) except NULL:
   15157             :  *     cdef _memoryviewslice obj
   15158             :  */
   15159             : 
   15160           0 : static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_mslice) {
   15161           0 :   struct __pyx_memoryviewslice_obj *__pyx_v_obj = 0;
   15162           0 :   __Pyx_memviewslice *__pyx_r;
   15163             :   __Pyx_RefNannyDeclarations
   15164           0 :   int __pyx_t_1;
   15165           0 :   PyObject *__pyx_t_2 = NULL;
   15166           0 :   int __pyx_lineno = 0;
   15167           0 :   const char *__pyx_filename = NULL;
   15168           0 :   int __pyx_clineno = 0;
   15169           0 :   __Pyx_RefNannySetupContext("get_slice_from_memview", 1);
   15170             : 
   15171             :   /* "View.MemoryView":1055
   15172             :  *                                                    __Pyx_memviewslice *mslice) except NULL:
   15173             :  *     cdef _memoryviewslice obj
   15174             :  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
   15175             :  *         obj = memview
   15176             :  *         return &obj.from_slice
   15177             :  */
   15178           0 :   __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); 
   15179           0 :   if (__pyx_t_1) {
   15180             : 
   15181             :     /* "View.MemoryView":1056
   15182             :  *     cdef _memoryviewslice obj
   15183             :  *     if isinstance(memview, _memoryviewslice):
   15184             :  *         obj = memview             # <<<<<<<<<<<<<<
   15185             :  *         return &obj.from_slice
   15186             :  *     else:
   15187             :  */
   15188           0 :     if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(1, 1056, __pyx_L1_error)
   15189           0 :     __pyx_t_2 = ((PyObject *)__pyx_v_memview);
   15190           0 :     __Pyx_INCREF(__pyx_t_2);
   15191           0 :     __pyx_v_obj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
   15192           0 :     __pyx_t_2 = 0;
   15193             : 
   15194             :     /* "View.MemoryView":1057
   15195             :  *     if isinstance(memview, _memoryviewslice):
   15196             :  *         obj = memview
   15197             :  *         return &obj.from_slice             # <<<<<<<<<<<<<<
   15198             :  *     else:
   15199             :  *         slice_copy(memview, mslice)
   15200             :  */
   15201           0 :     __pyx_r = (&__pyx_v_obj->from_slice);
   15202           0 :     goto __pyx_L0;
   15203             : 
   15204             :     /* "View.MemoryView":1055
   15205             :  *                                                    __Pyx_memviewslice *mslice) except NULL:
   15206             :  *     cdef _memoryviewslice obj
   15207             :  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
   15208             :  *         obj = memview
   15209             :  *         return &obj.from_slice
   15210             :  */
   15211             :   }
   15212             : 
   15213             :   /* "View.MemoryView":1059
   15214             :  *         return &obj.from_slice
   15215             :  *     else:
   15216             :  *         slice_copy(memview, mslice)             # <<<<<<<<<<<<<<
   15217             :  *         return mslice
   15218             :  * 
   15219             :  */
   15220             :   /*else*/ {
   15221           0 :     __pyx_memoryview_slice_copy(__pyx_v_memview, __pyx_v_mslice);
   15222             : 
   15223             :     /* "View.MemoryView":1060
   15224             :  *     else:
   15225             :  *         slice_copy(memview, mslice)
   15226             :  *         return mslice             # <<<<<<<<<<<<<<
   15227             :  * 
   15228             :  * @cname('__pyx_memoryview_slice_copy')
   15229             :  */
   15230           0 :     __pyx_r = __pyx_v_mslice;
   15231           0 :     goto __pyx_L0;
   15232             :   }
   15233             : 
   15234             :   /* "View.MemoryView":1052
   15235             :  * 
   15236             :  * @cname('__pyx_memoryview_get_slice_from_memoryview')
   15237             :  * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview,             # <<<<<<<<<<<<<<
   15238             :  *                                                    __Pyx_memviewslice *mslice) except NULL:
   15239             :  *     cdef _memoryviewslice obj
   15240             :  */
   15241             : 
   15242             :   /* function exit code */
   15243           0 :   __pyx_L1_error:;
   15244           0 :   __Pyx_XDECREF(__pyx_t_2);
   15245           0 :   __Pyx_AddTraceback("View.MemoryView.get_slice_from_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
   15246           0 :   __pyx_r = NULL;
   15247           0 :   __pyx_L0:;
   15248           0 :   __Pyx_XDECREF((PyObject *)__pyx_v_obj);
   15249           0 :   __Pyx_RefNannyFinishContext();
   15250           0 :   return __pyx_r;
   15251             : }
   15252             : 
   15253             : /* "View.MemoryView":1063
   15254             :  * 
   15255             :  * @cname('__pyx_memoryview_slice_copy')
   15256             :  * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst) noexcept:             # <<<<<<<<<<<<<<
   15257             :  *     cdef int dim
   15258             :  *     cdef (Py_ssize_t*) shape, strides, suboffsets
   15259             :  */
   15260             : 
   15261           0 : static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_dst) {
   15262           0 :   int __pyx_v_dim;
   15263           0 :   Py_ssize_t *__pyx_v_shape;
   15264           0 :   Py_ssize_t *__pyx_v_strides;
   15265           0 :   Py_ssize_t *__pyx_v_suboffsets;
   15266           0 :   Py_ssize_t *__pyx_t_1;
   15267           0 :   int __pyx_t_2;
   15268           0 :   int __pyx_t_3;
   15269           0 :   int __pyx_t_4;
   15270           0 :   Py_ssize_t __pyx_t_5;
   15271           0 :   int __pyx_t_6;
   15272             : 
   15273             :   /* "View.MemoryView":1067
   15274             :  *     cdef (Py_ssize_t*) shape, strides, suboffsets
   15275             :  * 
   15276             :  *     shape = memview.view.shape             # <<<<<<<<<<<<<<
   15277             :  *     strides = memview.view.strides
   15278             :  *     suboffsets = memview.view.suboffsets
   15279             :  */
   15280           0 :   __pyx_t_1 = __pyx_v_memview->view.shape;
   15281           0 :   __pyx_v_shape = __pyx_t_1;
   15282             : 
   15283             :   /* "View.MemoryView":1068
   15284             :  * 
   15285             :  *     shape = memview.view.shape
   15286             :  *     strides = memview.view.strides             # <<<<<<<<<<<<<<
   15287             :  *     suboffsets = memview.view.suboffsets
   15288             :  * 
   15289             :  */
   15290           0 :   __pyx_t_1 = __pyx_v_memview->view.strides;
   15291           0 :   __pyx_v_strides = __pyx_t_1;
   15292             : 
   15293             :   /* "View.MemoryView":1069
   15294             :  *     shape = memview.view.shape
   15295             :  *     strides = memview.view.strides
   15296             :  *     suboffsets = memview.view.suboffsets             # <<<<<<<<<<<<<<
   15297             :  * 
   15298             :  *     dst.memview = <__pyx_memoryview *> memview
   15299             :  */
   15300           0 :   __pyx_t_1 = __pyx_v_memview->view.suboffsets;
   15301           0 :   __pyx_v_suboffsets = __pyx_t_1;
   15302             : 
   15303             :   /* "View.MemoryView":1071
   15304             :  *     suboffsets = memview.view.suboffsets
   15305             :  * 
   15306             :  *     dst.memview = <__pyx_memoryview *> memview             # <<<<<<<<<<<<<<
   15307             :  *     dst.data = <char *> memview.view.buf
   15308             :  * 
   15309             :  */
   15310           0 :   __pyx_v_dst->memview = ((struct __pyx_memoryview_obj *)__pyx_v_memview);
   15311             : 
   15312             :   /* "View.MemoryView":1072
   15313             :  * 
   15314             :  *     dst.memview = <__pyx_memoryview *> memview
   15315             :  *     dst.data = <char *> memview.view.buf             # <<<<<<<<<<<<<<
   15316             :  * 
   15317             :  *     for dim in range(memview.view.ndim):
   15318             :  */
   15319           0 :   __pyx_v_dst->data = ((char *)__pyx_v_memview->view.buf);
   15320             : 
   15321             :   /* "View.MemoryView":1074
   15322             :  *     dst.data = <char *> memview.view.buf
   15323             :  * 
   15324             :  *     for dim in range(memview.view.ndim):             # <<<<<<<<<<<<<<
   15325             :  *         dst.shape[dim] = shape[dim]
   15326             :  *         dst.strides[dim] = strides[dim]
   15327             :  */
   15328           0 :   __pyx_t_2 = __pyx_v_memview->view.ndim;
   15329           0 :   __pyx_t_3 = __pyx_t_2;
   15330           0 :   for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
   15331           0 :     __pyx_v_dim = __pyx_t_4;
   15332             : 
   15333             :     /* "View.MemoryView":1075
   15334             :  * 
   15335             :  *     for dim in range(memview.view.ndim):
   15336             :  *         dst.shape[dim] = shape[dim]             # <<<<<<<<<<<<<<
   15337             :  *         dst.strides[dim] = strides[dim]
   15338             :  *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
   15339             :  */
   15340           0 :     (__pyx_v_dst->shape[__pyx_v_dim]) = (__pyx_v_shape[__pyx_v_dim]);
   15341             : 
   15342             :     /* "View.MemoryView":1076
   15343             :  *     for dim in range(memview.view.ndim):
   15344             :  *         dst.shape[dim] = shape[dim]
   15345             :  *         dst.strides[dim] = strides[dim]             # <<<<<<<<<<<<<<
   15346             :  *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
   15347             :  * 
   15348             :  */
   15349           0 :     (__pyx_v_dst->strides[__pyx_v_dim]) = (__pyx_v_strides[__pyx_v_dim]);
   15350             : 
   15351             :     /* "View.MemoryView":1077
   15352             :  *         dst.shape[dim] = shape[dim]
   15353             :  *         dst.strides[dim] = strides[dim]
   15354             :  *         dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1             # <<<<<<<<<<<<<<
   15355             :  * 
   15356             :  * @cname('__pyx_memoryview_copy_object')
   15357             :  */
   15358           0 :     __pyx_t_6 = (__pyx_v_suboffsets != 0);
   15359           0 :     if (__pyx_t_6) {
   15360           0 :       __pyx_t_5 = (__pyx_v_suboffsets[__pyx_v_dim]);
   15361             :     } else {
   15362             :       __pyx_t_5 = -1L;
   15363             :     }
   15364           0 :     (__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_5;
   15365             :   }
   15366             : 
   15367             :   /* "View.MemoryView":1063
   15368             :  * 
   15369             :  * @cname('__pyx_memoryview_slice_copy')
   15370             :  * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst) noexcept:             # <<<<<<<<<<<<<<
   15371             :  *     cdef int dim
   15372             :  *     cdef (Py_ssize_t*) shape, strides, suboffsets
   15373             :  */
   15374             : 
   15375             :   /* function exit code */
   15376           0 : }
   15377             : 
   15378             : /* "View.MemoryView":1080
   15379             :  * 
   15380             :  * @cname('__pyx_memoryview_copy_object')
   15381             :  * cdef memoryview_copy(memoryview memview):             # <<<<<<<<<<<<<<
   15382             :  *     "Create a new memoryview object"
   15383             :  *     cdef __Pyx_memviewslice memviewslice
   15384             :  */
   15385             : 
   15386           0 : static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx_v_memview) {
   15387           0 :   __Pyx_memviewslice __pyx_v_memviewslice;
   15388           0 :   PyObject *__pyx_r = NULL;
   15389             :   __Pyx_RefNannyDeclarations
   15390           0 :   PyObject *__pyx_t_1 = NULL;
   15391           0 :   int __pyx_lineno = 0;
   15392           0 :   const char *__pyx_filename = NULL;
   15393           0 :   int __pyx_clineno = 0;
   15394           0 :   __Pyx_RefNannySetupContext("memoryview_copy", 1);
   15395             : 
   15396             :   /* "View.MemoryView":1083
   15397             :  *     "Create a new memoryview object"
   15398             :  *     cdef __Pyx_memviewslice memviewslice
   15399             :  *     slice_copy(memview, &memviewslice)             # <<<<<<<<<<<<<<
   15400             :  *     return memoryview_copy_from_slice(memview, &memviewslice)
   15401             :  * 
   15402             :  */
   15403           0 :   __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_memviewslice));
   15404             : 
   15405             :   /* "View.MemoryView":1084
   15406             :  *     cdef __Pyx_memviewslice memviewslice
   15407             :  *     slice_copy(memview, &memviewslice)
   15408             :  *     return memoryview_copy_from_slice(memview, &memviewslice)             # <<<<<<<<<<<<<<
   15409             :  * 
   15410             :  * @cname('__pyx_memoryview_copy_object_from_slice')
   15411             :  */
   15412           0 :   __Pyx_XDECREF(__pyx_r);
   15413           0 :   __pyx_t_1 = __pyx_memoryview_copy_object_from_slice(__pyx_v_memview, (&__pyx_v_memviewslice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1084, __pyx_L1_error)
   15414           0 :   __Pyx_GOTREF(__pyx_t_1);
   15415           0 :   __pyx_r = __pyx_t_1;
   15416           0 :   __pyx_t_1 = 0;
   15417           0 :   goto __pyx_L0;
   15418             : 
   15419             :   /* "View.MemoryView":1080
   15420             :  * 
   15421             :  * @cname('__pyx_memoryview_copy_object')
   15422             :  * cdef memoryview_copy(memoryview memview):             # <<<<<<<<<<<<<<
   15423             :  *     "Create a new memoryview object"
   15424             :  *     cdef __Pyx_memviewslice memviewslice
   15425             :  */
   15426             : 
   15427             :   /* function exit code */
   15428           0 :   __pyx_L1_error:;
   15429           0 :   __Pyx_XDECREF(__pyx_t_1);
   15430           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview_copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
   15431           0 :   __pyx_r = 0;
   15432           0 :   __pyx_L0:;
   15433           0 :   __Pyx_XGIVEREF(__pyx_r);
   15434           0 :   __Pyx_RefNannyFinishContext();
   15435           0 :   return __pyx_r;
   15436             : }
   15437             : 
   15438             : /* "View.MemoryView":1087
   15439             :  * 
   15440             :  * @cname('__pyx_memoryview_copy_object_from_slice')
   15441             :  * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice):             # <<<<<<<<<<<<<<
   15442             :  *     """
   15443             :  *     Create a new memoryview object from a given memoryview object and slice.
   15444             :  */
   15445             : 
   15446           0 : static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_memviewslice) {
   15447           0 :   PyObject *(*__pyx_v_to_object_func)(char *);
   15448           0 :   int (*__pyx_v_to_dtype_func)(char *, PyObject *);
   15449           0 :   PyObject *__pyx_r = NULL;
   15450             :   __Pyx_RefNannyDeclarations
   15451           0 :   int __pyx_t_1;
   15452           0 :   PyObject *(*__pyx_t_2)(char *);
   15453           0 :   int (*__pyx_t_3)(char *, PyObject *);
   15454           0 :   PyObject *__pyx_t_4 = NULL;
   15455           0 :   int __pyx_lineno = 0;
   15456           0 :   const char *__pyx_filename = NULL;
   15457           0 :   int __pyx_clineno = 0;
   15458           0 :   __Pyx_RefNannySetupContext("memoryview_copy_from_slice", 1);
   15459             : 
   15460             :   /* "View.MemoryView":1094
   15461             :  *     cdef int (*to_dtype_func)(char *, object) except 0
   15462             :  * 
   15463             :  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
   15464             :  *         to_object_func = (<_memoryviewslice> memview).to_object_func
   15465             :  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
   15466             :  */
   15467           0 :   __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type); 
   15468           0 :   if (__pyx_t_1) {
   15469             : 
   15470             :     /* "View.MemoryView":1095
   15471             :  * 
   15472             :  *     if isinstance(memview, _memoryviewslice):
   15473             :  *         to_object_func = (<_memoryviewslice> memview).to_object_func             # <<<<<<<<<<<<<<
   15474             :  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
   15475             :  *     else:
   15476             :  */
   15477           0 :     __pyx_t_2 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_object_func;
   15478           0 :     __pyx_v_to_object_func = __pyx_t_2;
   15479             : 
   15480             :     /* "View.MemoryView":1096
   15481             :  *     if isinstance(memview, _memoryviewslice):
   15482             :  *         to_object_func = (<_memoryviewslice> memview).to_object_func
   15483             :  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func             # <<<<<<<<<<<<<<
   15484             :  *     else:
   15485             :  *         to_object_func = NULL
   15486             :  */
   15487           0 :     __pyx_t_3 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_dtype_func;
   15488           0 :     __pyx_v_to_dtype_func = __pyx_t_3;
   15489             : 
   15490             :     /* "View.MemoryView":1094
   15491             :  *     cdef int (*to_dtype_func)(char *, object) except 0
   15492             :  * 
   15493             :  *     if isinstance(memview, _memoryviewslice):             # <<<<<<<<<<<<<<
   15494             :  *         to_object_func = (<_memoryviewslice> memview).to_object_func
   15495             :  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
   15496             :  */
   15497           0 :     goto __pyx_L3;
   15498             :   }
   15499             : 
   15500             :   /* "View.MemoryView":1098
   15501             :  *         to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
   15502             :  *     else:
   15503             :  *         to_object_func = NULL             # <<<<<<<<<<<<<<
   15504             :  *         to_dtype_func = NULL
   15505             :  * 
   15506             :  */
   15507             :   /*else*/ {
   15508             :     __pyx_v_to_object_func = NULL;
   15509             : 
   15510             :     /* "View.MemoryView":1099
   15511             :  *     else:
   15512             :  *         to_object_func = NULL
   15513             :  *         to_dtype_func = NULL             # <<<<<<<<<<<<<<
   15514             :  * 
   15515             :  *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,
   15516             :  */
   15517             :     __pyx_v_to_dtype_func = NULL;
   15518             :   }
   15519           0 :   __pyx_L3:;
   15520             : 
   15521             :   /* "View.MemoryView":1101
   15522             :  *         to_dtype_func = NULL
   15523             :  * 
   15524             :  *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,             # <<<<<<<<<<<<<<
   15525             :  *                                 to_object_func, to_dtype_func,
   15526             :  *                                 memview.dtype_is_object)
   15527             :  */
   15528           0 :   __Pyx_XDECREF(__pyx_r);
   15529             : 
   15530             :   /* "View.MemoryView":1103
   15531             :  *     return memoryview_fromslice(memviewslice[0], memview.view.ndim,
   15532             :  *                                 to_object_func, to_dtype_func,
   15533             :  *                                 memview.dtype_is_object)             # <<<<<<<<<<<<<<
   15534             :  * 
   15535             :  * 
   15536             :  */
   15537           0 :   __pyx_t_4 = __pyx_memoryview_fromslice((__pyx_v_memviewslice[0]), __pyx_v_memview->view.ndim, __pyx_v_to_object_func, __pyx_v_to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1101, __pyx_L1_error)
   15538           0 :   __Pyx_GOTREF(__pyx_t_4);
   15539           0 :   __pyx_r = __pyx_t_4;
   15540           0 :   __pyx_t_4 = 0;
   15541           0 :   goto __pyx_L0;
   15542             : 
   15543             :   /* "View.MemoryView":1087
   15544             :  * 
   15545             :  * @cname('__pyx_memoryview_copy_object_from_slice')
   15546             :  * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice):             # <<<<<<<<<<<<<<
   15547             :  *     """
   15548             :  *     Create a new memoryview object from a given memoryview object and slice.
   15549             :  */
   15550             : 
   15551             :   /* function exit code */
   15552           0 :   __pyx_L1_error:;
   15553           0 :   __Pyx_XDECREF(__pyx_t_4);
   15554           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview_copy_from_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
   15555           0 :   __pyx_r = 0;
   15556           0 :   __pyx_L0:;
   15557           0 :   __Pyx_XGIVEREF(__pyx_r);
   15558           0 :   __Pyx_RefNannyFinishContext();
   15559           0 :   return __pyx_r;
   15560             : }
   15561             : 
   15562             : /* "View.MemoryView":1109
   15563             :  * 
   15564             :  * 
   15565             :  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil:             # <<<<<<<<<<<<<<
   15566             :  *     return -arg if arg < 0 else arg
   15567             :  * 
   15568             :  */
   15569             : 
   15570           0 : static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) {
   15571           0 :   Py_ssize_t __pyx_r;
   15572           0 :   Py_ssize_t __pyx_t_1;
   15573           0 :   int __pyx_t_2;
   15574             : 
   15575             :   /* "View.MemoryView":1110
   15576             :  * 
   15577             :  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil:
   15578             :  *     return -arg if arg < 0 else arg             # <<<<<<<<<<<<<<
   15579             :  * 
   15580             :  * @cname('__pyx_get_best_slice_order')
   15581             :  */
   15582           0 :   __pyx_t_2 = (__pyx_v_arg < 0);
   15583           0 :   if (__pyx_t_2) {
   15584             :     __pyx_t_1 = (-__pyx_v_arg);
   15585             :   } else {
   15586             :     __pyx_t_1 = __pyx_v_arg;
   15587             :   }
   15588           0 :   __pyx_r = __pyx_t_1;
   15589           0 :   goto __pyx_L0;
   15590             : 
   15591             :   /* "View.MemoryView":1109
   15592             :  * 
   15593             :  * 
   15594             :  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) noexcept nogil:             # <<<<<<<<<<<<<<
   15595             :  *     return -arg if arg < 0 else arg
   15596             :  * 
   15597             :  */
   15598             : 
   15599             :   /* function exit code */
   15600           0 :   __pyx_L0:;
   15601           0 :   return __pyx_r;
   15602             : }
   15603             : 
   15604             : /* "View.MemoryView":1113
   15605             :  * 
   15606             :  * @cname('__pyx_get_best_slice_order')
   15607             :  * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) noexcept nogil:             # <<<<<<<<<<<<<<
   15608             :  *     """
   15609             :  *     Figure out the best memory access order for a given slice.
   15610             :  */
   15611             : 
   15612           0 : static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim) {
   15613           0 :   int __pyx_v_i;
   15614           0 :   Py_ssize_t __pyx_v_c_stride;
   15615           0 :   Py_ssize_t __pyx_v_f_stride;
   15616           0 :   char __pyx_r;
   15617           0 :   int __pyx_t_1;
   15618           0 :   int __pyx_t_2;
   15619           0 :   int __pyx_t_3;
   15620           0 :   int __pyx_t_4;
   15621             : 
   15622             :   /* "View.MemoryView":1118
   15623             :  *     """
   15624             :  *     cdef int i
   15625             :  *     cdef Py_ssize_t c_stride = 0             # <<<<<<<<<<<<<<
   15626             :  *     cdef Py_ssize_t f_stride = 0
   15627             :  * 
   15628             :  */
   15629           0 :   __pyx_v_c_stride = 0;
   15630             : 
   15631             :   /* "View.MemoryView":1119
   15632             :  *     cdef int i
   15633             :  *     cdef Py_ssize_t c_stride = 0
   15634             :  *     cdef Py_ssize_t f_stride = 0             # <<<<<<<<<<<<<<
   15635             :  * 
   15636             :  *     for i in range(ndim - 1, -1, -1):
   15637             :  */
   15638           0 :   __pyx_v_f_stride = 0;
   15639             : 
   15640             :   /* "View.MemoryView":1121
   15641             :  *     cdef Py_ssize_t f_stride = 0
   15642             :  * 
   15643             :  *     for i in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
   15644             :  *         if mslice.shape[i] > 1:
   15645             :  *             c_stride = mslice.strides[i]
   15646             :  */
   15647           0 :   for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
   15648           0 :     __pyx_v_i = __pyx_t_1;
   15649             : 
   15650             :     /* "View.MemoryView":1122
   15651             :  * 
   15652             :  *     for i in range(ndim - 1, -1, -1):
   15653             :  *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
   15654             :  *             c_stride = mslice.strides[i]
   15655             :  *             break
   15656             :  */
   15657           0 :     __pyx_t_2 = ((__pyx_v_mslice->shape[__pyx_v_i]) > 1);
   15658           0 :     if (__pyx_t_2) {
   15659             : 
   15660             :       /* "View.MemoryView":1123
   15661             :  *     for i in range(ndim - 1, -1, -1):
   15662             :  *         if mslice.shape[i] > 1:
   15663             :  *             c_stride = mslice.strides[i]             # <<<<<<<<<<<<<<
   15664             :  *             break
   15665             :  * 
   15666             :  */
   15667           0 :       __pyx_v_c_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
   15668             : 
   15669             :       /* "View.MemoryView":1124
   15670             :  *         if mslice.shape[i] > 1:
   15671             :  *             c_stride = mslice.strides[i]
   15672             :  *             break             # <<<<<<<<<<<<<<
   15673             :  * 
   15674             :  *     for i in range(ndim):
   15675             :  */
   15676           0 :       goto __pyx_L4_break;
   15677             : 
   15678             :       /* "View.MemoryView":1122
   15679             :  * 
   15680             :  *     for i in range(ndim - 1, -1, -1):
   15681             :  *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
   15682             :  *             c_stride = mslice.strides[i]
   15683             :  *             break
   15684             :  */
   15685             :     }
   15686             :   }
   15687           0 :   __pyx_L4_break:;
   15688             : 
   15689             :   /* "View.MemoryView":1126
   15690             :  *             break
   15691             :  * 
   15692             :  *     for i in range(ndim):             # <<<<<<<<<<<<<<
   15693             :  *         if mslice.shape[i] > 1:
   15694             :  *             f_stride = mslice.strides[i]
   15695             :  */
   15696           0 :   __pyx_t_1 = __pyx_v_ndim;
   15697           0 :   __pyx_t_3 = __pyx_t_1;
   15698           0 :   for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
   15699           0 :     __pyx_v_i = __pyx_t_4;
   15700             : 
   15701             :     /* "View.MemoryView":1127
   15702             :  * 
   15703             :  *     for i in range(ndim):
   15704             :  *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
   15705             :  *             f_stride = mslice.strides[i]
   15706             :  *             break
   15707             :  */
   15708           0 :     __pyx_t_2 = ((__pyx_v_mslice->shape[__pyx_v_i]) > 1);
   15709           0 :     if (__pyx_t_2) {
   15710             : 
   15711             :       /* "View.MemoryView":1128
   15712             :  *     for i in range(ndim):
   15713             :  *         if mslice.shape[i] > 1:
   15714             :  *             f_stride = mslice.strides[i]             # <<<<<<<<<<<<<<
   15715             :  *             break
   15716             :  * 
   15717             :  */
   15718           0 :       __pyx_v_f_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
   15719             : 
   15720             :       /* "View.MemoryView":1129
   15721             :  *         if mslice.shape[i] > 1:
   15722             :  *             f_stride = mslice.strides[i]
   15723             :  *             break             # <<<<<<<<<<<<<<
   15724             :  * 
   15725             :  *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
   15726             :  */
   15727           0 :       goto __pyx_L7_break;
   15728             : 
   15729             :       /* "View.MemoryView":1127
   15730             :  * 
   15731             :  *     for i in range(ndim):
   15732             :  *         if mslice.shape[i] > 1:             # <<<<<<<<<<<<<<
   15733             :  *             f_stride = mslice.strides[i]
   15734             :  *             break
   15735             :  */
   15736             :     }
   15737             :   }
   15738           0 :   __pyx_L7_break:;
   15739             : 
   15740             :   /* "View.MemoryView":1131
   15741             :  *             break
   15742             :  * 
   15743             :  *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):             # <<<<<<<<<<<<<<
   15744             :  *         return 'C'
   15745             :  *     else:
   15746             :  */
   15747           0 :   __pyx_t_2 = (abs_py_ssize_t(__pyx_v_c_stride) <= abs_py_ssize_t(__pyx_v_f_stride));
   15748           0 :   if (__pyx_t_2) {
   15749             : 
   15750             :     /* "View.MemoryView":1132
   15751             :  * 
   15752             :  *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
   15753             :  *         return 'C'             # <<<<<<<<<<<<<<
   15754             :  *     else:
   15755             :  *         return 'F'
   15756             :  */
   15757           0 :     __pyx_r = 'C';
   15758           0 :     goto __pyx_L0;
   15759             : 
   15760             :     /* "View.MemoryView":1131
   15761             :  *             break
   15762             :  * 
   15763             :  *     if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):             # <<<<<<<<<<<<<<
   15764             :  *         return 'C'
   15765             :  *     else:
   15766             :  */
   15767             :   }
   15768             : 
   15769             :   /* "View.MemoryView":1134
   15770             :  *         return 'C'
   15771             :  *     else:
   15772             :  *         return 'F'             # <<<<<<<<<<<<<<
   15773             :  * 
   15774             :  * @cython.cdivision(True)
   15775             :  */
   15776             :   /*else*/ {
   15777           0 :     __pyx_r = 'F';
   15778           0 :     goto __pyx_L0;
   15779             :   }
   15780             : 
   15781             :   /* "View.MemoryView":1113
   15782             :  * 
   15783             :  * @cname('__pyx_get_best_slice_order')
   15784             :  * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) noexcept nogil:             # <<<<<<<<<<<<<<
   15785             :  *     """
   15786             :  *     Figure out the best memory access order for a given slice.
   15787             :  */
   15788             : 
   15789             :   /* function exit code */
   15790           0 :   __pyx_L0:;
   15791           0 :   return __pyx_r;
   15792             : }
   15793             : 
   15794             : /* "View.MemoryView":1137
   15795             :  * 
   15796             :  * @cython.cdivision(True)
   15797             :  * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides,             # <<<<<<<<<<<<<<
   15798             :  *                                    char *dst_data, Py_ssize_t *dst_strides,
   15799             :  *                                    Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
   15800             :  */
   15801             : 
   15802           0 : static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v_src_strides, char *__pyx_v_dst_data, Py_ssize_t *__pyx_v_dst_strides, Py_ssize_t *__pyx_v_src_shape, Py_ssize_t *__pyx_v_dst_shape, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
   15803           0 :   CYTHON_UNUSED Py_ssize_t __pyx_v_i;
   15804           0 :   CYTHON_UNUSED Py_ssize_t __pyx_v_src_extent;
   15805           0 :   Py_ssize_t __pyx_v_dst_extent;
   15806           0 :   Py_ssize_t __pyx_v_src_stride;
   15807           0 :   Py_ssize_t __pyx_v_dst_stride;
   15808           0 :   int __pyx_t_1;
   15809           0 :   int __pyx_t_2;
   15810           0 :   Py_ssize_t __pyx_t_3;
   15811           0 :   Py_ssize_t __pyx_t_4;
   15812           0 :   Py_ssize_t __pyx_t_5;
   15813             : 
   15814             :   /* "View.MemoryView":1144
   15815             :  * 
   15816             :  *     cdef Py_ssize_t i
   15817             :  *     cdef Py_ssize_t src_extent = src_shape[0]             # <<<<<<<<<<<<<<
   15818             :  *     cdef Py_ssize_t dst_extent = dst_shape[0]
   15819             :  *     cdef Py_ssize_t src_stride = src_strides[0]
   15820             :  */
   15821           0 :   __pyx_v_src_extent = (__pyx_v_src_shape[0]);
   15822             : 
   15823             :   /* "View.MemoryView":1145
   15824             :  *     cdef Py_ssize_t i
   15825             :  *     cdef Py_ssize_t src_extent = src_shape[0]
   15826             :  *     cdef Py_ssize_t dst_extent = dst_shape[0]             # <<<<<<<<<<<<<<
   15827             :  *     cdef Py_ssize_t src_stride = src_strides[0]
   15828             :  *     cdef Py_ssize_t dst_stride = dst_strides[0]
   15829             :  */
   15830           0 :   __pyx_v_dst_extent = (__pyx_v_dst_shape[0]);
   15831             : 
   15832             :   /* "View.MemoryView":1146
   15833             :  *     cdef Py_ssize_t src_extent = src_shape[0]
   15834             :  *     cdef Py_ssize_t dst_extent = dst_shape[0]
   15835             :  *     cdef Py_ssize_t src_stride = src_strides[0]             # <<<<<<<<<<<<<<
   15836             :  *     cdef Py_ssize_t dst_stride = dst_strides[0]
   15837             :  * 
   15838             :  */
   15839           0 :   __pyx_v_src_stride = (__pyx_v_src_strides[0]);
   15840             : 
   15841             :   /* "View.MemoryView":1147
   15842             :  *     cdef Py_ssize_t dst_extent = dst_shape[0]
   15843             :  *     cdef Py_ssize_t src_stride = src_strides[0]
   15844             :  *     cdef Py_ssize_t dst_stride = dst_strides[0]             # <<<<<<<<<<<<<<
   15845             :  * 
   15846             :  *     if ndim == 1:
   15847             :  */
   15848           0 :   __pyx_v_dst_stride = (__pyx_v_dst_strides[0]);
   15849             : 
   15850             :   /* "View.MemoryView":1149
   15851             :  *     cdef Py_ssize_t dst_stride = dst_strides[0]
   15852             :  * 
   15853             :  *     if ndim == 1:             # <<<<<<<<<<<<<<
   15854             :  *         if (src_stride > 0 and dst_stride > 0 and
   15855             :  *             <size_t> src_stride == itemsize == <size_t> dst_stride):
   15856             :  */
   15857           0 :   __pyx_t_1 = (__pyx_v_ndim == 1);
   15858           0 :   if (__pyx_t_1) {
   15859             : 
   15860             :     /* "View.MemoryView":1150
   15861             :  * 
   15862             :  *     if ndim == 1:
   15863             :  *         if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
   15864             :  *             <size_t> src_stride == itemsize == <size_t> dst_stride):
   15865             :  *             memcpy(dst_data, src_data, itemsize * dst_extent)
   15866             :  */
   15867           0 :     __pyx_t_2 = (__pyx_v_src_stride > 0);
   15868           0 :     if (__pyx_t_2) {
   15869           0 :     } else {
   15870           0 :       __pyx_t_1 = __pyx_t_2;
   15871           0 :       goto __pyx_L5_bool_binop_done;
   15872             :     }
   15873           0 :     __pyx_t_2 = (__pyx_v_dst_stride > 0);
   15874           0 :     if (__pyx_t_2) {
   15875           0 :     } else {
   15876           0 :       __pyx_t_1 = __pyx_t_2;
   15877           0 :       goto __pyx_L5_bool_binop_done;
   15878             :     }
   15879             : 
   15880             :     /* "View.MemoryView":1151
   15881             :  *     if ndim == 1:
   15882             :  *         if (src_stride > 0 and dst_stride > 0 and
   15883             :  *             <size_t> src_stride == itemsize == <size_t> dst_stride):             # <<<<<<<<<<<<<<
   15884             :  *             memcpy(dst_data, src_data, itemsize * dst_extent)
   15885             :  *         else:
   15886             :  */
   15887           0 :     __pyx_t_2 = (((size_t)__pyx_v_src_stride) == __pyx_v_itemsize);
   15888           0 :     if (__pyx_t_2) {
   15889           0 :       __pyx_t_2 = (__pyx_v_itemsize == ((size_t)__pyx_v_dst_stride));
   15890             :     }
   15891             :     __pyx_t_1 = __pyx_t_2;
   15892           0 :     __pyx_L5_bool_binop_done:;
   15893             : 
   15894             :     /* "View.MemoryView":1150
   15895             :  * 
   15896             :  *     if ndim == 1:
   15897             :  *         if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
   15898             :  *             <size_t> src_stride == itemsize == <size_t> dst_stride):
   15899             :  *             memcpy(dst_data, src_data, itemsize * dst_extent)
   15900             :  */
   15901           0 :     if (__pyx_t_1) {
   15902             : 
   15903             :       /* "View.MemoryView":1152
   15904             :  *         if (src_stride > 0 and dst_stride > 0 and
   15905             :  *             <size_t> src_stride == itemsize == <size_t> dst_stride):
   15906             :  *             memcpy(dst_data, src_data, itemsize * dst_extent)             # <<<<<<<<<<<<<<
   15907             :  *         else:
   15908             :  *             for i in range(dst_extent):
   15909             :  */
   15910           0 :       (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent)));
   15911             : 
   15912             :       /* "View.MemoryView":1150
   15913             :  * 
   15914             :  *     if ndim == 1:
   15915             :  *         if (src_stride > 0 and dst_stride > 0 and             # <<<<<<<<<<<<<<
   15916             :  *             <size_t> src_stride == itemsize == <size_t> dst_stride):
   15917             :  *             memcpy(dst_data, src_data, itemsize * dst_extent)
   15918             :  */
   15919           0 :       goto __pyx_L4;
   15920             :     }
   15921             : 
   15922             :     /* "View.MemoryView":1154
   15923             :  *             memcpy(dst_data, src_data, itemsize * dst_extent)
   15924             :  *         else:
   15925             :  *             for i in range(dst_extent):             # <<<<<<<<<<<<<<
   15926             :  *                 memcpy(dst_data, src_data, itemsize)
   15927             :  *                 src_data += src_stride
   15928             :  */
   15929             :     /*else*/ {
   15930             :       __pyx_t_3 = __pyx_v_dst_extent;
   15931             :       __pyx_t_4 = __pyx_t_3;
   15932           0 :       for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
   15933           0 :         __pyx_v_i = __pyx_t_5;
   15934             : 
   15935             :         /* "View.MemoryView":1155
   15936             :  *         else:
   15937             :  *             for i in range(dst_extent):
   15938             :  *                 memcpy(dst_data, src_data, itemsize)             # <<<<<<<<<<<<<<
   15939             :  *                 src_data += src_stride
   15940             :  *                 dst_data += dst_stride
   15941             :  */
   15942           0 :         (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize));
   15943             : 
   15944             :         /* "View.MemoryView":1156
   15945             :  *             for i in range(dst_extent):
   15946             :  *                 memcpy(dst_data, src_data, itemsize)
   15947             :  *                 src_data += src_stride             # <<<<<<<<<<<<<<
   15948             :  *                 dst_data += dst_stride
   15949             :  *     else:
   15950             :  */
   15951           0 :         __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
   15952             : 
   15953             :         /* "View.MemoryView":1157
   15954             :  *                 memcpy(dst_data, src_data, itemsize)
   15955             :  *                 src_data += src_stride
   15956             :  *                 dst_data += dst_stride             # <<<<<<<<<<<<<<
   15957             :  *     else:
   15958             :  *         for i in range(dst_extent):
   15959             :  */
   15960           0 :         __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
   15961             :       }
   15962             :     }
   15963           0 :     __pyx_L4:;
   15964             : 
   15965             :     /* "View.MemoryView":1149
   15966             :  *     cdef Py_ssize_t dst_stride = dst_strides[0]
   15967             :  * 
   15968             :  *     if ndim == 1:             # <<<<<<<<<<<<<<
   15969             :  *         if (src_stride > 0 and dst_stride > 0 and
   15970             :  *             <size_t> src_stride == itemsize == <size_t> dst_stride):
   15971             :  */
   15972           0 :     goto __pyx_L3;
   15973             :   }
   15974             : 
   15975             :   /* "View.MemoryView":1159
   15976             :  *                 dst_data += dst_stride
   15977             :  *     else:
   15978             :  *         for i in range(dst_extent):             # <<<<<<<<<<<<<<
   15979             :  *             _copy_strided_to_strided(src_data, src_strides + 1,
   15980             :  *                                      dst_data, dst_strides + 1,
   15981             :  */
   15982             :   /*else*/ {
   15983             :     __pyx_t_3 = __pyx_v_dst_extent;
   15984             :     __pyx_t_4 = __pyx_t_3;
   15985           0 :     for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
   15986           0 :       __pyx_v_i = __pyx_t_5;
   15987             : 
   15988             :       /* "View.MemoryView":1160
   15989             :  *     else:
   15990             :  *         for i in range(dst_extent):
   15991             :  *             _copy_strided_to_strided(src_data, src_strides + 1,             # <<<<<<<<<<<<<<
   15992             :  *                                      dst_data, dst_strides + 1,
   15993             :  *                                      src_shape + 1, dst_shape + 1,
   15994             :  */
   15995           0 :       _copy_strided_to_strided(__pyx_v_src_data, (__pyx_v_src_strides + 1), __pyx_v_dst_data, (__pyx_v_dst_strides + 1), (__pyx_v_src_shape + 1), (__pyx_v_dst_shape + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize);
   15996             : 
   15997             :       /* "View.MemoryView":1164
   15998             :  *                                      src_shape + 1, dst_shape + 1,
   15999             :  *                                      ndim - 1, itemsize)
   16000             :  *             src_data += src_stride             # <<<<<<<<<<<<<<
   16001             :  *             dst_data += dst_stride
   16002             :  * 
   16003             :  */
   16004           0 :       __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
   16005             : 
   16006             :       /* "View.MemoryView":1165
   16007             :  *                                      ndim - 1, itemsize)
   16008             :  *             src_data += src_stride
   16009             :  *             dst_data += dst_stride             # <<<<<<<<<<<<<<
   16010             :  * 
   16011             :  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,
   16012             :  */
   16013           0 :       __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
   16014             :     }
   16015             :   }
   16016           0 :   __pyx_L3:;
   16017             : 
   16018             :   /* "View.MemoryView":1137
   16019             :  * 
   16020             :  * @cython.cdivision(True)
   16021             :  * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides,             # <<<<<<<<<<<<<<
   16022             :  *                                    char *dst_data, Py_ssize_t *dst_strides,
   16023             :  *                                    Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
   16024             :  */
   16025             : 
   16026             :   /* function exit code */
   16027           0 : }
   16028             : 
   16029             : /* "View.MemoryView":1167
   16030             :  *             dst_data += dst_stride
   16031             :  * 
   16032             :  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
   16033             :  *                                   __Pyx_memviewslice *dst,
   16034             :  *                                   int ndim, size_t itemsize) noexcept nogil:
   16035             :  */
   16036             : 
   16037           0 : static void copy_strided_to_strided(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
   16038             : 
   16039             :   /* "View.MemoryView":1170
   16040             :  *                                   __Pyx_memviewslice *dst,
   16041             :  *                                   int ndim, size_t itemsize) noexcept nogil:
   16042             :  *     _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides,             # <<<<<<<<<<<<<<
   16043             :  *                              src.shape, dst.shape, ndim, itemsize)
   16044             :  * 
   16045             :  */
   16046           0 :   _copy_strided_to_strided(__pyx_v_src->data, __pyx_v_src->strides, __pyx_v_dst->data, __pyx_v_dst->strides, __pyx_v_src->shape, __pyx_v_dst->shape, __pyx_v_ndim, __pyx_v_itemsize);
   16047             : 
   16048             :   /* "View.MemoryView":1167
   16049             :  *             dst_data += dst_stride
   16050             :  * 
   16051             :  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
   16052             :  *                                   __Pyx_memviewslice *dst,
   16053             :  *                                   int ndim, size_t itemsize) noexcept nogil:
   16054             :  */
   16055             : 
   16056             :   /* function exit code */
   16057           0 : }
   16058             : 
   16059             : /* "View.MemoryView":1174
   16060             :  * 
   16061             :  * @cname('__pyx_memoryview_slice_get_size')
   16062             :  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil:             # <<<<<<<<<<<<<<
   16063             :  *     "Return the size of the memory occupied by the slice in number of bytes"
   16064             :  *     cdef Py_ssize_t shape, size = src.memview.view.itemsize
   16065             :  */
   16066             : 
   16067           0 : static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_src, int __pyx_v_ndim) {
   16068           0 :   Py_ssize_t __pyx_v_shape;
   16069           0 :   Py_ssize_t __pyx_v_size;
   16070           0 :   Py_ssize_t __pyx_r;
   16071           0 :   Py_ssize_t __pyx_t_1;
   16072           0 :   Py_ssize_t *__pyx_t_2;
   16073           0 :   Py_ssize_t *__pyx_t_3;
   16074           0 :   Py_ssize_t *__pyx_t_4;
   16075             : 
   16076             :   /* "View.MemoryView":1176
   16077             :  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil:
   16078             :  *     "Return the size of the memory occupied by the slice in number of bytes"
   16079             :  *     cdef Py_ssize_t shape, size = src.memview.view.itemsize             # <<<<<<<<<<<<<<
   16080             :  * 
   16081             :  *     for shape in src.shape[:ndim]:
   16082             :  */
   16083           0 :   __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
   16084           0 :   __pyx_v_size = __pyx_t_1;
   16085             : 
   16086             :   /* "View.MemoryView":1178
   16087             :  *     cdef Py_ssize_t shape, size = src.memview.view.itemsize
   16088             :  * 
   16089             :  *     for shape in src.shape[:ndim]:             # <<<<<<<<<<<<<<
   16090             :  *         size *= shape
   16091             :  * 
   16092             :  */
   16093           0 :   __pyx_t_3 = (__pyx_v_src->shape + __pyx_v_ndim);
   16094           0 :   for (__pyx_t_4 = __pyx_v_src->shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
   16095           0 :     __pyx_t_2 = __pyx_t_4;
   16096           0 :     __pyx_v_shape = (__pyx_t_2[0]);
   16097             : 
   16098             :     /* "View.MemoryView":1179
   16099             :  * 
   16100             :  *     for shape in src.shape[:ndim]:
   16101             :  *         size *= shape             # <<<<<<<<<<<<<<
   16102             :  * 
   16103             :  *     return size
   16104             :  */
   16105           0 :     __pyx_v_size = (__pyx_v_size * __pyx_v_shape);
   16106             :   }
   16107             : 
   16108             :   /* "View.MemoryView":1181
   16109             :  *         size *= shape
   16110             :  * 
   16111             :  *     return size             # <<<<<<<<<<<<<<
   16112             :  * 
   16113             :  * @cname('__pyx_fill_contig_strides_array')
   16114             :  */
   16115           0 :   __pyx_r = __pyx_v_size;
   16116           0 :   goto __pyx_L0;
   16117             : 
   16118             :   /* "View.MemoryView":1174
   16119             :  * 
   16120             :  * @cname('__pyx_memoryview_slice_get_size')
   16121             :  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) noexcept nogil:             # <<<<<<<<<<<<<<
   16122             :  *     "Return the size of the memory occupied by the slice in number of bytes"
   16123             :  *     cdef Py_ssize_t shape, size = src.memview.view.itemsize
   16124             :  */
   16125             : 
   16126             :   /* function exit code */
   16127           0 :   __pyx_L0:;
   16128           0 :   return __pyx_r;
   16129             : }
   16130             : 
   16131             : /* "View.MemoryView":1184
   16132             :  * 
   16133             :  * @cname('__pyx_fill_contig_strides_array')
   16134             :  * cdef Py_ssize_t fill_contig_strides_array(             # <<<<<<<<<<<<<<
   16135             :  *                 Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
   16136             :  *                 int ndim, char order) noexcept nogil:
   16137             :  */
   16138             : 
   16139           0 : static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, Py_ssize_t __pyx_v_stride, int __pyx_v_ndim, char __pyx_v_order) {
   16140           0 :   int __pyx_v_idx;
   16141           0 :   Py_ssize_t __pyx_r;
   16142           0 :   int __pyx_t_1;
   16143           0 :   int __pyx_t_2;
   16144           0 :   int __pyx_t_3;
   16145           0 :   int __pyx_t_4;
   16146             : 
   16147             :   /* "View.MemoryView":1193
   16148             :  *     cdef int idx
   16149             :  * 
   16150             :  *     if order == 'F':             # <<<<<<<<<<<<<<
   16151             :  *         for idx in range(ndim):
   16152             :  *             strides[idx] = stride
   16153             :  */
   16154           0 :   __pyx_t_1 = (__pyx_v_order == 'F');
   16155           0 :   if (__pyx_t_1) {
   16156             : 
   16157             :     /* "View.MemoryView":1194
   16158             :  * 
   16159             :  *     if order == 'F':
   16160             :  *         for idx in range(ndim):             # <<<<<<<<<<<<<<
   16161             :  *             strides[idx] = stride
   16162             :  *             stride *= shape[idx]
   16163             :  */
   16164           0 :     __pyx_t_2 = __pyx_v_ndim;
   16165             :     __pyx_t_3 = __pyx_t_2;
   16166           0 :     for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
   16167           0 :       __pyx_v_idx = __pyx_t_4;
   16168             : 
   16169             :       /* "View.MemoryView":1195
   16170             :  *     if order == 'F':
   16171             :  *         for idx in range(ndim):
   16172             :  *             strides[idx] = stride             # <<<<<<<<<<<<<<
   16173             :  *             stride *= shape[idx]
   16174             :  *     else:
   16175             :  */
   16176           0 :       (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
   16177             : 
   16178             :       /* "View.MemoryView":1196
   16179             :  *         for idx in range(ndim):
   16180             :  *             strides[idx] = stride
   16181             :  *             stride *= shape[idx]             # <<<<<<<<<<<<<<
   16182             :  *     else:
   16183             :  *         for idx in range(ndim - 1, -1, -1):
   16184             :  */
   16185           0 :       __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
   16186             :     }
   16187             : 
   16188             :     /* "View.MemoryView":1193
   16189             :  *     cdef int idx
   16190             :  * 
   16191             :  *     if order == 'F':             # <<<<<<<<<<<<<<
   16192             :  *         for idx in range(ndim):
   16193             :  *             strides[idx] = stride
   16194             :  */
   16195           0 :     goto __pyx_L3;
   16196             :   }
   16197             : 
   16198             :   /* "View.MemoryView":1198
   16199             :  *             stride *= shape[idx]
   16200             :  *     else:
   16201             :  *         for idx in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
   16202             :  *             strides[idx] = stride
   16203             :  *             stride *= shape[idx]
   16204             :  */
   16205             :   /*else*/ {
   16206           0 :     for (__pyx_t_2 = (__pyx_v_ndim - 1); __pyx_t_2 > -1; __pyx_t_2-=1) {
   16207           0 :       __pyx_v_idx = __pyx_t_2;
   16208             : 
   16209             :       /* "View.MemoryView":1199
   16210             :  *     else:
   16211             :  *         for idx in range(ndim - 1, -1, -1):
   16212             :  *             strides[idx] = stride             # <<<<<<<<<<<<<<
   16213             :  *             stride *= shape[idx]
   16214             :  * 
   16215             :  */
   16216           0 :       (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
   16217             : 
   16218             :       /* "View.MemoryView":1200
   16219             :  *         for idx in range(ndim - 1, -1, -1):
   16220             :  *             strides[idx] = stride
   16221             :  *             stride *= shape[idx]             # <<<<<<<<<<<<<<
   16222             :  * 
   16223             :  *     return stride
   16224             :  */
   16225           0 :       __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
   16226             :     }
   16227             :   }
   16228           0 :   __pyx_L3:;
   16229             : 
   16230             :   /* "View.MemoryView":1202
   16231             :  *             stride *= shape[idx]
   16232             :  * 
   16233             :  *     return stride             # <<<<<<<<<<<<<<
   16234             :  * 
   16235             :  * @cname('__pyx_memoryview_copy_data_to_temp')
   16236             :  */
   16237           0 :   __pyx_r = __pyx_v_stride;
   16238           0 :   goto __pyx_L0;
   16239             : 
   16240             :   /* "View.MemoryView":1184
   16241             :  * 
   16242             :  * @cname('__pyx_fill_contig_strides_array')
   16243             :  * cdef Py_ssize_t fill_contig_strides_array(             # <<<<<<<<<<<<<<
   16244             :  *                 Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
   16245             :  *                 int ndim, char order) noexcept nogil:
   16246             :  */
   16247             : 
   16248             :   /* function exit code */
   16249           0 :   __pyx_L0:;
   16250           0 :   return __pyx_r;
   16251             : }
   16252             : 
   16253             : /* "View.MemoryView":1205
   16254             :  * 
   16255             :  * @cname('__pyx_memoryview_copy_data_to_temp')
   16256             :  * cdef void *copy_data_to_temp(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
   16257             :  *                              __Pyx_memviewslice *tmpslice,
   16258             :  *                              char order,
   16259             :  */
   16260             : 
   16261           0 : static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_tmpslice, char __pyx_v_order, int __pyx_v_ndim) {
   16262           0 :   int __pyx_v_i;
   16263           0 :   void *__pyx_v_result;
   16264           0 :   size_t __pyx_v_itemsize;
   16265           0 :   size_t __pyx_v_size;
   16266           0 :   void *__pyx_r;
   16267           0 :   Py_ssize_t __pyx_t_1;
   16268           0 :   int __pyx_t_2;
   16269           0 :   int __pyx_t_3;
   16270           0 :   struct __pyx_memoryview_obj *__pyx_t_4;
   16271           0 :   int __pyx_t_5;
   16272           0 :   int __pyx_t_6;
   16273           0 :   int __pyx_lineno = 0;
   16274           0 :   const char *__pyx_filename = NULL;
   16275           0 :   int __pyx_clineno = 0;
   16276             :   #ifdef WITH_THREAD
   16277           0 :   PyGILState_STATE __pyx_gilstate_save;
   16278             :   #endif
   16279             : 
   16280             :   /* "View.MemoryView":1216
   16281             :  *     cdef void *result
   16282             :  * 
   16283             :  *     cdef size_t itemsize = src.memview.view.itemsize             # <<<<<<<<<<<<<<
   16284             :  *     cdef size_t size = slice_get_size(src, ndim)
   16285             :  * 
   16286             :  */
   16287           0 :   __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
   16288           0 :   __pyx_v_itemsize = __pyx_t_1;
   16289             : 
   16290             :   /* "View.MemoryView":1217
   16291             :  * 
   16292             :  *     cdef size_t itemsize = src.memview.view.itemsize
   16293             :  *     cdef size_t size = slice_get_size(src, ndim)             # <<<<<<<<<<<<<<
   16294             :  * 
   16295             :  *     result = malloc(size)
   16296             :  */
   16297           0 :   __pyx_v_size = __pyx_memoryview_slice_get_size(__pyx_v_src, __pyx_v_ndim);
   16298             : 
   16299             :   /* "View.MemoryView":1219
   16300             :  *     cdef size_t size = slice_get_size(src, ndim)
   16301             :  * 
   16302             :  *     result = malloc(size)             # <<<<<<<<<<<<<<
   16303             :  *     if not result:
   16304             :  *         _err_no_memory()
   16305             :  */
   16306           0 :   __pyx_v_result = malloc(__pyx_v_size);
   16307             : 
   16308             :   /* "View.MemoryView":1220
   16309             :  * 
   16310             :  *     result = malloc(size)
   16311             :  *     if not result:             # <<<<<<<<<<<<<<
   16312             :  *         _err_no_memory()
   16313             :  * 
   16314             :  */
   16315           0 :   __pyx_t_2 = (!(__pyx_v_result != 0));
   16316           0 :   if (__pyx_t_2) {
   16317             : 
   16318             :     /* "View.MemoryView":1221
   16319             :  *     result = malloc(size)
   16320             :  *     if not result:
   16321             :  *         _err_no_memory()             # <<<<<<<<<<<<<<
   16322             :  * 
   16323             :  * 
   16324             :  */
   16325           0 :     __pyx_t_3 = __pyx_memoryview_err_no_memory(); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1221, __pyx_L1_error)
   16326             : 
   16327             :     /* "View.MemoryView":1220
   16328             :  * 
   16329             :  *     result = malloc(size)
   16330             :  *     if not result:             # <<<<<<<<<<<<<<
   16331             :  *         _err_no_memory()
   16332             :  * 
   16333             :  */
   16334             :   }
   16335             : 
   16336             :   /* "View.MemoryView":1224
   16337             :  * 
   16338             :  * 
   16339             :  *     tmpslice.data = <char *> result             # <<<<<<<<<<<<<<
   16340             :  *     tmpslice.memview = src.memview
   16341             :  *     for i in range(ndim):
   16342             :  */
   16343           0 :   __pyx_v_tmpslice->data = ((char *)__pyx_v_result);
   16344             : 
   16345             :   /* "View.MemoryView":1225
   16346             :  * 
   16347             :  *     tmpslice.data = <char *> result
   16348             :  *     tmpslice.memview = src.memview             # <<<<<<<<<<<<<<
   16349             :  *     for i in range(ndim):
   16350             :  *         tmpslice.shape[i] = src.shape[i]
   16351             :  */
   16352           0 :   __pyx_t_4 = __pyx_v_src->memview;
   16353           0 :   __pyx_v_tmpslice->memview = __pyx_t_4;
   16354             : 
   16355             :   /* "View.MemoryView":1226
   16356             :  *     tmpslice.data = <char *> result
   16357             :  *     tmpslice.memview = src.memview
   16358             :  *     for i in range(ndim):             # <<<<<<<<<<<<<<
   16359             :  *         tmpslice.shape[i] = src.shape[i]
   16360             :  *         tmpslice.suboffsets[i] = -1
   16361             :  */
   16362           0 :   __pyx_t_3 = __pyx_v_ndim;
   16363           0 :   __pyx_t_5 = __pyx_t_3;
   16364           0 :   for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
   16365           0 :     __pyx_v_i = __pyx_t_6;
   16366             : 
   16367             :     /* "View.MemoryView":1227
   16368             :  *     tmpslice.memview = src.memview
   16369             :  *     for i in range(ndim):
   16370             :  *         tmpslice.shape[i] = src.shape[i]             # <<<<<<<<<<<<<<
   16371             :  *         tmpslice.suboffsets[i] = -1
   16372             :  * 
   16373             :  */
   16374           0 :     (__pyx_v_tmpslice->shape[__pyx_v_i]) = (__pyx_v_src->shape[__pyx_v_i]);
   16375             : 
   16376             :     /* "View.MemoryView":1228
   16377             :  *     for i in range(ndim):
   16378             :  *         tmpslice.shape[i] = src.shape[i]
   16379             :  *         tmpslice.suboffsets[i] = -1             # <<<<<<<<<<<<<<
   16380             :  * 
   16381             :  *     fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, ndim, order)
   16382             :  */
   16383           0 :     (__pyx_v_tmpslice->suboffsets[__pyx_v_i]) = -1L;
   16384             :   }
   16385             : 
   16386             :   /* "View.MemoryView":1230
   16387             :  *         tmpslice.suboffsets[i] = -1
   16388             :  * 
   16389             :  *     fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, ndim, order)             # <<<<<<<<<<<<<<
   16390             :  * 
   16391             :  * 
   16392             :  */
   16393           0 :   (void)(__pyx_fill_contig_strides_array((&(__pyx_v_tmpslice->shape[0])), (&(__pyx_v_tmpslice->strides[0])), __pyx_v_itemsize, __pyx_v_ndim, __pyx_v_order));
   16394             : 
   16395             :   /* "View.MemoryView":1233
   16396             :  * 
   16397             :  * 
   16398             :  *     for i in range(ndim):             # <<<<<<<<<<<<<<
   16399             :  *         if tmpslice.shape[i] == 1:
   16400             :  *             tmpslice.strides[i] = 0
   16401             :  */
   16402           0 :   __pyx_t_3 = __pyx_v_ndim;
   16403           0 :   __pyx_t_5 = __pyx_t_3;
   16404           0 :   for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
   16405           0 :     __pyx_v_i = __pyx_t_6;
   16406             : 
   16407             :     /* "View.MemoryView":1234
   16408             :  * 
   16409             :  *     for i in range(ndim):
   16410             :  *         if tmpslice.shape[i] == 1:             # <<<<<<<<<<<<<<
   16411             :  *             tmpslice.strides[i] = 0
   16412             :  * 
   16413             :  */
   16414           0 :     __pyx_t_2 = ((__pyx_v_tmpslice->shape[__pyx_v_i]) == 1);
   16415           0 :     if (__pyx_t_2) {
   16416             : 
   16417             :       /* "View.MemoryView":1235
   16418             :  *     for i in range(ndim):
   16419             :  *         if tmpslice.shape[i] == 1:
   16420             :  *             tmpslice.strides[i] = 0             # <<<<<<<<<<<<<<
   16421             :  * 
   16422             :  *     if slice_is_contig(src[0], order, ndim):
   16423             :  */
   16424           0 :       (__pyx_v_tmpslice->strides[__pyx_v_i]) = 0;
   16425             : 
   16426             :       /* "View.MemoryView":1234
   16427             :  * 
   16428             :  *     for i in range(ndim):
   16429             :  *         if tmpslice.shape[i] == 1:             # <<<<<<<<<<<<<<
   16430             :  *             tmpslice.strides[i] = 0
   16431             :  * 
   16432             :  */
   16433             :     }
   16434             :   }
   16435             : 
   16436             :   /* "View.MemoryView":1237
   16437             :  *             tmpslice.strides[i] = 0
   16438             :  * 
   16439             :  *     if slice_is_contig(src[0], order, ndim):             # <<<<<<<<<<<<<<
   16440             :  *         memcpy(result, src.data, size)
   16441             :  *     else:
   16442             :  */
   16443           0 :   __pyx_t_2 = __pyx_memviewslice_is_contig((__pyx_v_src[0]), __pyx_v_order, __pyx_v_ndim);
   16444           0 :   if (__pyx_t_2) {
   16445             : 
   16446             :     /* "View.MemoryView":1238
   16447             :  * 
   16448             :  *     if slice_is_contig(src[0], order, ndim):
   16449             :  *         memcpy(result, src.data, size)             # <<<<<<<<<<<<<<
   16450             :  *     else:
   16451             :  *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)
   16452             :  */
   16453           0 :     (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size));
   16454             : 
   16455             :     /* "View.MemoryView":1237
   16456             :  *             tmpslice.strides[i] = 0
   16457             :  * 
   16458             :  *     if slice_is_contig(src[0], order, ndim):             # <<<<<<<<<<<<<<
   16459             :  *         memcpy(result, src.data, size)
   16460             :  *     else:
   16461             :  */
   16462           0 :     goto __pyx_L9;
   16463             :   }
   16464             : 
   16465             :   /* "View.MemoryView":1240
   16466             :  *         memcpy(result, src.data, size)
   16467             :  *     else:
   16468             :  *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)             # <<<<<<<<<<<<<<
   16469             :  * 
   16470             :  *     return result
   16471             :  */
   16472             :   /*else*/ {
   16473           0 :     copy_strided_to_strided(__pyx_v_src, __pyx_v_tmpslice, __pyx_v_ndim, __pyx_v_itemsize);
   16474             :   }
   16475           0 :   __pyx_L9:;
   16476             : 
   16477             :   /* "View.MemoryView":1242
   16478             :  *         copy_strided_to_strided(src, tmpslice, ndim, itemsize)
   16479             :  * 
   16480             :  *     return result             # <<<<<<<<<<<<<<
   16481             :  * 
   16482             :  * 
   16483             :  */
   16484           0 :   __pyx_r = __pyx_v_result;
   16485           0 :   goto __pyx_L0;
   16486             : 
   16487             :   /* "View.MemoryView":1205
   16488             :  * 
   16489             :  * @cname('__pyx_memoryview_copy_data_to_temp')
   16490             :  * cdef void *copy_data_to_temp(__Pyx_memviewslice *src,             # <<<<<<<<<<<<<<
   16491             :  *                              __Pyx_memviewslice *tmpslice,
   16492             :  *                              char order,
   16493             :  */
   16494             : 
   16495             :   /* function exit code */
   16496           0 :   __pyx_L1_error:;
   16497             :   #ifdef WITH_THREAD
   16498           0 :   __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   16499             :   #endif
   16500           0 :   __Pyx_AddTraceback("View.MemoryView.copy_data_to_temp", __pyx_clineno, __pyx_lineno, __pyx_filename);
   16501           0 :   __pyx_r = NULL;
   16502             :   #ifdef WITH_THREAD
   16503           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   16504             :   #endif
   16505           0 :   __pyx_L0:;
   16506           0 :   return __pyx_r;
   16507             : }
   16508             : 
   16509             : /* "View.MemoryView":1247
   16510             :  * 
   16511             :  * @cname('__pyx_memoryview_err_extents')
   16512             :  * cdef int _err_extents(int i, Py_ssize_t extent1,             # <<<<<<<<<<<<<<
   16513             :  *                              Py_ssize_t extent2) except -1 with gil:
   16514             :  *     raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})"
   16515             :  */
   16516             : 
   16517           0 : static int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_v_extent1, Py_ssize_t __pyx_v_extent2) {
   16518           0 :   int __pyx_r;
   16519             :   __Pyx_RefNannyDeclarations
   16520           0 :   PyObject *__pyx_t_1 = NULL;
   16521           0 :   Py_ssize_t __pyx_t_2;
   16522           0 :   Py_UCS4 __pyx_t_3;
   16523           0 :   PyObject *__pyx_t_4 = NULL;
   16524           0 :   int __pyx_lineno = 0;
   16525           0 :   const char *__pyx_filename = NULL;
   16526           0 :   int __pyx_clineno = 0;
   16527             :   #ifdef WITH_THREAD
   16528           0 :   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   16529             :   #endif
   16530           0 :   __Pyx_RefNannySetupContext("_err_extents", 0);
   16531             : 
   16532             :   /* "View.MemoryView":1249
   16533             :  * cdef int _err_extents(int i, Py_ssize_t extent1,
   16534             :  *                              Py_ssize_t extent2) except -1 with gil:
   16535             :  *     raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})"             # <<<<<<<<<<<<<<
   16536             :  * 
   16537             :  * @cname('__pyx_memoryview_err_dim')
   16538             :  */
   16539           0 :   __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1249, __pyx_L1_error)
   16540           0 :   __Pyx_GOTREF(__pyx_t_1);
   16541           0 :   __pyx_t_2 = 0;
   16542           0 :   __pyx_t_3 = 127;
   16543           0 :   __Pyx_INCREF(__pyx_kp_u_got_differing_extents_in_dimensi);
   16544           0 :   __pyx_t_2 += 35;
   16545           0 :   __Pyx_GIVEREF(__pyx_kp_u_got_differing_extents_in_dimensi);
   16546           0 :   PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_got_differing_extents_in_dimensi);
   16547           0 :   __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_i, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1249, __pyx_L1_error)
   16548           0 :   __Pyx_GOTREF(__pyx_t_4);
   16549           0 :   __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
   16550           0 :   __Pyx_GIVEREF(__pyx_t_4);
   16551           0 :   PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
   16552           0 :   __pyx_t_4 = 0;
   16553           0 :   __Pyx_INCREF(__pyx_kp_u_got);
   16554           0 :   __pyx_t_2 += 6;
   16555           0 :   __Pyx_GIVEREF(__pyx_kp_u_got);
   16556           0 :   PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_got);
   16557           0 :   __pyx_t_4 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_extent1, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1249, __pyx_L1_error)
   16558           0 :   __Pyx_GOTREF(__pyx_t_4);
   16559           0 :   __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
   16560           0 :   __Pyx_GIVEREF(__pyx_t_4);
   16561           0 :   PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
   16562           0 :   __pyx_t_4 = 0;
   16563           0 :   __Pyx_INCREF(__pyx_kp_u_and);
   16564           0 :   __pyx_t_2 += 5;
   16565           0 :   __Pyx_GIVEREF(__pyx_kp_u_and);
   16566           0 :   PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_and);
   16567           0 :   __pyx_t_4 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_v_extent2, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1249, __pyx_L1_error)
   16568           0 :   __Pyx_GOTREF(__pyx_t_4);
   16569           0 :   __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
   16570           0 :   __Pyx_GIVEREF(__pyx_t_4);
   16571           0 :   PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_4);
   16572           0 :   __pyx_t_4 = 0;
   16573           0 :   __Pyx_INCREF(__pyx_kp_u__7);
   16574           0 :   __pyx_t_2 += 1;
   16575           0 :   __Pyx_GIVEREF(__pyx_kp_u__7);
   16576           0 :   PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__7);
   16577           0 :   __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 7, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1249, __pyx_L1_error)
   16578           0 :   __Pyx_GOTREF(__pyx_t_4);
   16579           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   16580           0 :   __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_4, 0, 0);
   16581           0 :   __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   16582           0 :   __PYX_ERR(1, 1249, __pyx_L1_error)
   16583             : 
   16584             :   /* "View.MemoryView":1247
   16585             :  * 
   16586             :  * @cname('__pyx_memoryview_err_extents')
   16587             :  * cdef int _err_extents(int i, Py_ssize_t extent1,             # <<<<<<<<<<<<<<
   16588             :  *                              Py_ssize_t extent2) except -1 with gil:
   16589             :  *     raise ValueError, f"got differing extents in dimension {i} (got {extent1} and {extent2})"
   16590             :  */
   16591             : 
   16592             :   /* function exit code */
   16593           0 :   __pyx_L1_error:;
   16594           0 :   __Pyx_XDECREF(__pyx_t_1);
   16595           0 :   __Pyx_XDECREF(__pyx_t_4);
   16596           0 :   __Pyx_AddTraceback("View.MemoryView._err_extents", __pyx_clineno, __pyx_lineno, __pyx_filename);
   16597           0 :   __pyx_r = -1;
   16598           0 :   __Pyx_RefNannyFinishContext();
   16599             :   #ifdef WITH_THREAD
   16600           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   16601             :   #endif
   16602           0 :   return __pyx_r;
   16603             : }
   16604             : 
   16605             : /* "View.MemoryView":1252
   16606             :  * 
   16607             :  * @cname('__pyx_memoryview_err_dim')
   16608             :  * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil:             # <<<<<<<<<<<<<<
   16609             :  *     raise <object>error, msg % dim
   16610             :  * 
   16611             :  */
   16612             : 
   16613           0 : static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, PyObject *__pyx_v_msg, int __pyx_v_dim) {
   16614           0 :   int __pyx_r;
   16615             :   __Pyx_RefNannyDeclarations
   16616           0 :   PyObject *__pyx_t_1 = NULL;
   16617           0 :   PyObject *__pyx_t_2 = NULL;
   16618           0 :   int __pyx_lineno = 0;
   16619           0 :   const char *__pyx_filename = NULL;
   16620           0 :   int __pyx_clineno = 0;
   16621             :   #ifdef WITH_THREAD
   16622           0 :   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   16623             :   #endif
   16624           0 :   __Pyx_RefNannySetupContext("_err_dim", 0);
   16625           0 :   __Pyx_INCREF(__pyx_v_msg);
   16626             : 
   16627             :   /* "View.MemoryView":1253
   16628             :  * @cname('__pyx_memoryview_err_dim')
   16629             :  * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil:
   16630             :  *     raise <object>error, msg % dim             # <<<<<<<<<<<<<<
   16631             :  * 
   16632             :  * @cname('__pyx_memoryview_err')
   16633             :  */
   16634           0 :   __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1253, __pyx_L1_error)
   16635           0 :   __Pyx_GOTREF(__pyx_t_1);
   16636           0 :   __pyx_t_2 = __Pyx_PyString_FormatSafe(__pyx_v_msg, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1253, __pyx_L1_error)
   16637           0 :   __Pyx_GOTREF(__pyx_t_2);
   16638           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   16639           0 :   __Pyx_Raise(((PyObject *)__pyx_v_error), __pyx_t_2, 0, 0);
   16640           0 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   16641           0 :   __PYX_ERR(1, 1253, __pyx_L1_error)
   16642             : 
   16643             :   /* "View.MemoryView":1252
   16644             :  * 
   16645             :  * @cname('__pyx_memoryview_err_dim')
   16646             :  * cdef int _err_dim(PyObject *error, str msg, int dim) except -1 with gil:             # <<<<<<<<<<<<<<
   16647             :  *     raise <object>error, msg % dim
   16648             :  * 
   16649             :  */
   16650             : 
   16651             :   /* function exit code */
   16652           0 :   __pyx_L1_error:;
   16653           0 :   __Pyx_XDECREF(__pyx_t_1);
   16654           0 :   __Pyx_XDECREF(__pyx_t_2);
   16655           0 :   __Pyx_AddTraceback("View.MemoryView._err_dim", __pyx_clineno, __pyx_lineno, __pyx_filename);
   16656           0 :   __pyx_r = -1;
   16657           0 :   __Pyx_XDECREF(__pyx_v_msg);
   16658           0 :   __Pyx_RefNannyFinishContext();
   16659             :   #ifdef WITH_THREAD
   16660           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   16661             :   #endif
   16662           0 :   return __pyx_r;
   16663             : }
   16664             : 
   16665             : /* "View.MemoryView":1256
   16666             :  * 
   16667             :  * @cname('__pyx_memoryview_err')
   16668             :  * cdef int _err(PyObject *error, str msg) except -1 with gil:             # <<<<<<<<<<<<<<
   16669             :  *     raise <object>error, msg
   16670             :  * 
   16671             :  */
   16672             : 
   16673           0 : static int __pyx_memoryview_err(PyObject *__pyx_v_error, PyObject *__pyx_v_msg) {
   16674           0 :   int __pyx_r;
   16675             :   __Pyx_RefNannyDeclarations
   16676           0 :   int __pyx_lineno = 0;
   16677           0 :   const char *__pyx_filename = NULL;
   16678           0 :   int __pyx_clineno = 0;
   16679             :   #ifdef WITH_THREAD
   16680           0 :   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   16681             :   #endif
   16682           0 :   __Pyx_RefNannySetupContext("_err", 0);
   16683           0 :   __Pyx_INCREF(__pyx_v_msg);
   16684             : 
   16685             :   /* "View.MemoryView":1257
   16686             :  * @cname('__pyx_memoryview_err')
   16687             :  * cdef int _err(PyObject *error, str msg) except -1 with gil:
   16688             :  *     raise <object>error, msg             # <<<<<<<<<<<<<<
   16689             :  * 
   16690             :  * @cname('__pyx_memoryview_err_no_memory')
   16691             :  */
   16692           0 :   __Pyx_Raise(((PyObject *)__pyx_v_error), __pyx_v_msg, 0, 0);
   16693           0 :   __PYX_ERR(1, 1257, __pyx_L1_error)
   16694             : 
   16695             :   /* "View.MemoryView":1256
   16696             :  * 
   16697             :  * @cname('__pyx_memoryview_err')
   16698             :  * cdef int _err(PyObject *error, str msg) except -1 with gil:             # <<<<<<<<<<<<<<
   16699             :  *     raise <object>error, msg
   16700             :  * 
   16701             :  */
   16702             : 
   16703             :   /* function exit code */
   16704           0 :   __pyx_L1_error:;
   16705           0 :   __Pyx_AddTraceback("View.MemoryView._err", __pyx_clineno, __pyx_lineno, __pyx_filename);
   16706           0 :   __pyx_r = -1;
   16707           0 :   __Pyx_XDECREF(__pyx_v_msg);
   16708           0 :   __Pyx_RefNannyFinishContext();
   16709             :   #ifdef WITH_THREAD
   16710           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   16711             :   #endif
   16712           0 :   return __pyx_r;
   16713             : }
   16714             : 
   16715             : /* "View.MemoryView":1260
   16716             :  * 
   16717             :  * @cname('__pyx_memoryview_err_no_memory')
   16718             :  * cdef int _err_no_memory() except -1 with gil:             # <<<<<<<<<<<<<<
   16719             :  *     raise MemoryError
   16720             :  * 
   16721             :  */
   16722             : 
   16723           0 : static int __pyx_memoryview_err_no_memory(void) {
   16724           0 :   int __pyx_r;
   16725           0 :   int __pyx_lineno = 0;
   16726           0 :   const char *__pyx_filename = NULL;
   16727           0 :   int __pyx_clineno = 0;
   16728             :   #ifdef WITH_THREAD
   16729           0 :   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   16730             :   #endif
   16731             : 
   16732             :   /* "View.MemoryView":1261
   16733             :  * @cname('__pyx_memoryview_err_no_memory')
   16734             :  * cdef int _err_no_memory() except -1 with gil:
   16735             :  *     raise MemoryError             # <<<<<<<<<<<<<<
   16736             :  * 
   16737             :  * 
   16738             :  */
   16739           0 :   PyErr_NoMemory(); __PYX_ERR(1, 1261, __pyx_L1_error)
   16740             : 
   16741             :   /* "View.MemoryView":1260
   16742             :  * 
   16743             :  * @cname('__pyx_memoryview_err_no_memory')
   16744             :  * cdef int _err_no_memory() except -1 with gil:             # <<<<<<<<<<<<<<
   16745             :  *     raise MemoryError
   16746             :  * 
   16747             :  */
   16748             : 
   16749             :   /* function exit code */
   16750           0 :   __pyx_L1_error:;
   16751           0 :   __Pyx_AddTraceback("View.MemoryView._err_no_memory", __pyx_clineno, __pyx_lineno, __pyx_filename);
   16752           0 :   __pyx_r = -1;
   16753             :   #ifdef WITH_THREAD
   16754           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   16755             :   #endif
   16756           0 :   return __pyx_r;
   16757             : }
   16758             : 
   16759             : /* "View.MemoryView":1265
   16760             :  * 
   16761             :  * @cname('__pyx_memoryview_copy_contents')
   16762             :  * cdef int memoryview_copy_contents(__Pyx_memviewslice src,             # <<<<<<<<<<<<<<
   16763             :  *                                   __Pyx_memviewslice dst,
   16764             :  *                                   int src_ndim, int dst_ndim,
   16765             :  */
   16766             : 
   16767           0 : static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_memviewslice __pyx_v_dst, int __pyx_v_src_ndim, int __pyx_v_dst_ndim, int __pyx_v_dtype_is_object) {
   16768           0 :   void *__pyx_v_tmpdata;
   16769           0 :   size_t __pyx_v_itemsize;
   16770           0 :   int __pyx_v_i;
   16771           0 :   char __pyx_v_order;
   16772           0 :   int __pyx_v_broadcasting;
   16773           0 :   int __pyx_v_direct_copy;
   16774           0 :   __Pyx_memviewslice __pyx_v_tmp;
   16775           0 :   int __pyx_v_ndim;
   16776           0 :   int __pyx_r;
   16777           0 :   Py_ssize_t __pyx_t_1;
   16778           0 :   int __pyx_t_2;
   16779           0 :   int __pyx_t_3;
   16780           0 :   int __pyx_t_4;
   16781           0 :   int __pyx_t_5;
   16782           0 :   int __pyx_t_6;
   16783           0 :   void *__pyx_t_7;
   16784           0 :   int __pyx_lineno = 0;
   16785           0 :   const char *__pyx_filename = NULL;
   16786           0 :   int __pyx_clineno = 0;
   16787             :   #ifdef WITH_THREAD
   16788           0 :   PyGILState_STATE __pyx_gilstate_save;
   16789             :   #endif
   16790             : 
   16791             :   /* "View.MemoryView":1273
   16792             :  *     Check for overlapping memory and verify the shapes.
   16793             :  *     """
   16794             :  *     cdef void *tmpdata = NULL             # <<<<<<<<<<<<<<
   16795             :  *     cdef size_t itemsize = src.memview.view.itemsize
   16796             :  *     cdef int i
   16797             :  */
   16798           0 :   __pyx_v_tmpdata = NULL;
   16799             : 
   16800             :   /* "View.MemoryView":1274
   16801             :  *     """
   16802             :  *     cdef void *tmpdata = NULL
   16803             :  *     cdef size_t itemsize = src.memview.view.itemsize             # <<<<<<<<<<<<<<
   16804             :  *     cdef int i
   16805             :  *     cdef char order = get_best_order(&src, src_ndim)
   16806             :  */
   16807           0 :   __pyx_t_1 = __pyx_v_src.memview->view.itemsize;
   16808           0 :   __pyx_v_itemsize = __pyx_t_1;
   16809             : 
   16810             :   /* "View.MemoryView":1276
   16811             :  *     cdef size_t itemsize = src.memview.view.itemsize
   16812             :  *     cdef int i
   16813             :  *     cdef char order = get_best_order(&src, src_ndim)             # <<<<<<<<<<<<<<
   16814             :  *     cdef bint broadcasting = False
   16815             :  *     cdef bint direct_copy = False
   16816             :  */
   16817           0 :   __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_src), __pyx_v_src_ndim);
   16818             : 
   16819             :   /* "View.MemoryView":1277
   16820             :  *     cdef int i
   16821             :  *     cdef char order = get_best_order(&src, src_ndim)
   16822             :  *     cdef bint broadcasting = False             # <<<<<<<<<<<<<<
   16823             :  *     cdef bint direct_copy = False
   16824             :  *     cdef __Pyx_memviewslice tmp
   16825             :  */
   16826           0 :   __pyx_v_broadcasting = 0;
   16827             : 
   16828             :   /* "View.MemoryView":1278
   16829             :  *     cdef char order = get_best_order(&src, src_ndim)
   16830             :  *     cdef bint broadcasting = False
   16831             :  *     cdef bint direct_copy = False             # <<<<<<<<<<<<<<
   16832             :  *     cdef __Pyx_memviewslice tmp
   16833             :  * 
   16834             :  */
   16835           0 :   __pyx_v_direct_copy = 0;
   16836             : 
   16837             :   /* "View.MemoryView":1281
   16838             :  *     cdef __Pyx_memviewslice tmp
   16839             :  * 
   16840             :  *     if src_ndim < dst_ndim:             # <<<<<<<<<<<<<<
   16841             :  *         broadcast_leading(&src, src_ndim, dst_ndim)
   16842             :  *     elif dst_ndim < src_ndim:
   16843             :  */
   16844           0 :   __pyx_t_2 = (__pyx_v_src_ndim < __pyx_v_dst_ndim);
   16845           0 :   if (__pyx_t_2) {
   16846             : 
   16847             :     /* "View.MemoryView":1282
   16848             :  * 
   16849             :  *     if src_ndim < dst_ndim:
   16850             :  *         broadcast_leading(&src, src_ndim, dst_ndim)             # <<<<<<<<<<<<<<
   16851             :  *     elif dst_ndim < src_ndim:
   16852             :  *         broadcast_leading(&dst, dst_ndim, src_ndim)
   16853             :  */
   16854           0 :     __pyx_memoryview_broadcast_leading((&__pyx_v_src), __pyx_v_src_ndim, __pyx_v_dst_ndim);
   16855             : 
   16856             :     /* "View.MemoryView":1281
   16857             :  *     cdef __Pyx_memviewslice tmp
   16858             :  * 
   16859             :  *     if src_ndim < dst_ndim:             # <<<<<<<<<<<<<<
   16860             :  *         broadcast_leading(&src, src_ndim, dst_ndim)
   16861             :  *     elif dst_ndim < src_ndim:
   16862             :  */
   16863           0 :     goto __pyx_L3;
   16864             :   }
   16865             : 
   16866             :   /* "View.MemoryView":1283
   16867             :  *     if src_ndim < dst_ndim:
   16868             :  *         broadcast_leading(&src, src_ndim, dst_ndim)
   16869             :  *     elif dst_ndim < src_ndim:             # <<<<<<<<<<<<<<
   16870             :  *         broadcast_leading(&dst, dst_ndim, src_ndim)
   16871             :  * 
   16872             :  */
   16873           0 :   __pyx_t_2 = (__pyx_v_dst_ndim < __pyx_v_src_ndim);
   16874           0 :   if (__pyx_t_2) {
   16875             : 
   16876             :     /* "View.MemoryView":1284
   16877             :  *         broadcast_leading(&src, src_ndim, dst_ndim)
   16878             :  *     elif dst_ndim < src_ndim:
   16879             :  *         broadcast_leading(&dst, dst_ndim, src_ndim)             # <<<<<<<<<<<<<<
   16880             :  * 
   16881             :  *     cdef int ndim = max(src_ndim, dst_ndim)
   16882             :  */
   16883           0 :     __pyx_memoryview_broadcast_leading((&__pyx_v_dst), __pyx_v_dst_ndim, __pyx_v_src_ndim);
   16884             : 
   16885             :     /* "View.MemoryView":1283
   16886             :  *     if src_ndim < dst_ndim:
   16887             :  *         broadcast_leading(&src, src_ndim, dst_ndim)
   16888             :  *     elif dst_ndim < src_ndim:             # <<<<<<<<<<<<<<
   16889             :  *         broadcast_leading(&dst, dst_ndim, src_ndim)
   16890             :  * 
   16891             :  */
   16892             :   }
   16893           0 :   __pyx_L3:;
   16894             : 
   16895             :   /* "View.MemoryView":1286
   16896             :  *         broadcast_leading(&dst, dst_ndim, src_ndim)
   16897             :  * 
   16898             :  *     cdef int ndim = max(src_ndim, dst_ndim)             # <<<<<<<<<<<<<<
   16899             :  * 
   16900             :  *     for i in range(ndim):
   16901             :  */
   16902           0 :   __pyx_t_3 = __pyx_v_dst_ndim;
   16903           0 :   __pyx_t_4 = __pyx_v_src_ndim;
   16904           0 :   __pyx_t_2 = (__pyx_t_3 > __pyx_t_4);
   16905           0 :   if (__pyx_t_2) {
   16906             :     __pyx_t_5 = __pyx_t_3;
   16907             :   } else {
   16908             :     __pyx_t_5 = __pyx_t_4;
   16909             :   }
   16910           0 :   __pyx_v_ndim = __pyx_t_5;
   16911             : 
   16912             :   /* "View.MemoryView":1288
   16913             :  *     cdef int ndim = max(src_ndim, dst_ndim)
   16914             :  * 
   16915             :  *     for i in range(ndim):             # <<<<<<<<<<<<<<
   16916             :  *         if src.shape[i] != dst.shape[i]:
   16917             :  *             if src.shape[i] == 1:
   16918             :  */
   16919           0 :   __pyx_t_5 = __pyx_v_ndim;
   16920           0 :   __pyx_t_3 = __pyx_t_5;
   16921           0 :   for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
   16922           0 :     __pyx_v_i = __pyx_t_4;
   16923             : 
   16924             :     /* "View.MemoryView":1289
   16925             :  * 
   16926             :  *     for i in range(ndim):
   16927             :  *         if src.shape[i] != dst.shape[i]:             # <<<<<<<<<<<<<<
   16928             :  *             if src.shape[i] == 1:
   16929             :  *                 broadcasting = True
   16930             :  */
   16931           0 :     __pyx_t_2 = ((__pyx_v_src.shape[__pyx_v_i]) != (__pyx_v_dst.shape[__pyx_v_i]));
   16932           0 :     if (__pyx_t_2) {
   16933             : 
   16934             :       /* "View.MemoryView":1290
   16935             :  *     for i in range(ndim):
   16936             :  *         if src.shape[i] != dst.shape[i]:
   16937             :  *             if src.shape[i] == 1:             # <<<<<<<<<<<<<<
   16938             :  *                 broadcasting = True
   16939             :  *                 src.strides[i] = 0
   16940             :  */
   16941           0 :       __pyx_t_2 = ((__pyx_v_src.shape[__pyx_v_i]) == 1);
   16942           0 :       if (__pyx_t_2) {
   16943             : 
   16944             :         /* "View.MemoryView":1291
   16945             :  *         if src.shape[i] != dst.shape[i]:
   16946             :  *             if src.shape[i] == 1:
   16947             :  *                 broadcasting = True             # <<<<<<<<<<<<<<
   16948             :  *                 src.strides[i] = 0
   16949             :  *             else:
   16950             :  */
   16951           0 :         __pyx_v_broadcasting = 1;
   16952             : 
   16953             :         /* "View.MemoryView":1292
   16954             :  *             if src.shape[i] == 1:
   16955             :  *                 broadcasting = True
   16956             :  *                 src.strides[i] = 0             # <<<<<<<<<<<<<<
   16957             :  *             else:
   16958             :  *                 _err_extents(i, dst.shape[i], src.shape[i])
   16959             :  */
   16960           0 :         (__pyx_v_src.strides[__pyx_v_i]) = 0;
   16961             : 
   16962             :         /* "View.MemoryView":1290
   16963             :  *     for i in range(ndim):
   16964             :  *         if src.shape[i] != dst.shape[i]:
   16965             :  *             if src.shape[i] == 1:             # <<<<<<<<<<<<<<
   16966             :  *                 broadcasting = True
   16967             :  *                 src.strides[i] = 0
   16968             :  */
   16969           0 :         goto __pyx_L7;
   16970             :       }
   16971             : 
   16972             :       /* "View.MemoryView":1294
   16973             :  *                 src.strides[i] = 0
   16974             :  *             else:
   16975             :  *                 _err_extents(i, dst.shape[i], src.shape[i])             # <<<<<<<<<<<<<<
   16976             :  * 
   16977             :  *         if src.suboffsets[i] >= 0:
   16978             :  */
   16979             :       /*else*/ {
   16980           0 :         __pyx_t_6 = __pyx_memoryview_err_extents(__pyx_v_i, (__pyx_v_dst.shape[__pyx_v_i]), (__pyx_v_src.shape[__pyx_v_i])); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1294, __pyx_L1_error)
   16981             :       }
   16982           0 :       __pyx_L7:;
   16983             : 
   16984             :       /* "View.MemoryView":1289
   16985             :  * 
   16986             :  *     for i in range(ndim):
   16987             :  *         if src.shape[i] != dst.shape[i]:             # <<<<<<<<<<<<<<
   16988             :  *             if src.shape[i] == 1:
   16989             :  *                 broadcasting = True
   16990             :  */
   16991             :     }
   16992             : 
   16993             :     /* "View.MemoryView":1296
   16994             :  *                 _err_extents(i, dst.shape[i], src.shape[i])
   16995             :  * 
   16996             :  *         if src.suboffsets[i] >= 0:             # <<<<<<<<<<<<<<
   16997             :  *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
   16998             :  * 
   16999             :  */
   17000           0 :     __pyx_t_2 = ((__pyx_v_src.suboffsets[__pyx_v_i]) >= 0);
   17001           0 :     if (__pyx_t_2) {
   17002             : 
   17003             :       /* "View.MemoryView":1297
   17004             :  * 
   17005             :  *         if src.suboffsets[i] >= 0:
   17006             :  *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)             # <<<<<<<<<<<<<<
   17007             :  * 
   17008             :  *     if slices_overlap(&src, &dst, ndim, itemsize):
   17009             :  */
   17010           0 :       __pyx_t_6 = __pyx_memoryview_err_dim(PyExc_ValueError, __pyx_kp_s_Dimension_d_is_not_direct, __pyx_v_i); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1297, __pyx_L1_error)
   17011             : 
   17012             :       /* "View.MemoryView":1296
   17013             :  *                 _err_extents(i, dst.shape[i], src.shape[i])
   17014             :  * 
   17015             :  *         if src.suboffsets[i] >= 0:             # <<<<<<<<<<<<<<
   17016             :  *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
   17017             :  * 
   17018             :  */
   17019             :     }
   17020             :   }
   17021             : 
   17022             :   /* "View.MemoryView":1299
   17023             :  *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
   17024             :  * 
   17025             :  *     if slices_overlap(&src, &dst, ndim, itemsize):             # <<<<<<<<<<<<<<
   17026             :  * 
   17027             :  *         if not slice_is_contig(src, order, ndim):
   17028             :  */
   17029           0 :   __pyx_t_2 = __pyx_slices_overlap((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);
   17030           0 :   if (__pyx_t_2) {
   17031             : 
   17032             :     /* "View.MemoryView":1301
   17033             :  *     if slices_overlap(&src, &dst, ndim, itemsize):
   17034             :  * 
   17035             :  *         if not slice_is_contig(src, order, ndim):             # <<<<<<<<<<<<<<
   17036             :  *             order = get_best_order(&dst, ndim)
   17037             :  * 
   17038             :  */
   17039           0 :     __pyx_t_2 = (!__pyx_memviewslice_is_contig(__pyx_v_src, __pyx_v_order, __pyx_v_ndim));
   17040           0 :     if (__pyx_t_2) {
   17041             : 
   17042             :       /* "View.MemoryView":1302
   17043             :  * 
   17044             :  *         if not slice_is_contig(src, order, ndim):
   17045             :  *             order = get_best_order(&dst, ndim)             # <<<<<<<<<<<<<<
   17046             :  * 
   17047             :  *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
   17048             :  */
   17049           0 :       __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim);
   17050             : 
   17051             :       /* "View.MemoryView":1301
   17052             :  *     if slices_overlap(&src, &dst, ndim, itemsize):
   17053             :  * 
   17054             :  *         if not slice_is_contig(src, order, ndim):             # <<<<<<<<<<<<<<
   17055             :  *             order = get_best_order(&dst, ndim)
   17056             :  * 
   17057             :  */
   17058             :     }
   17059             : 
   17060             :     /* "View.MemoryView":1304
   17061             :  *             order = get_best_order(&dst, ndim)
   17062             :  * 
   17063             :  *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)             # <<<<<<<<<<<<<<
   17064             :  *         src = tmp
   17065             :  * 
   17066             :  */
   17067           0 :     __pyx_t_7 = __pyx_memoryview_copy_data_to_temp((&__pyx_v_src), (&__pyx_v_tmp), __pyx_v_order, __pyx_v_ndim); if (unlikely(__pyx_t_7 == ((void *)NULL))) __PYX_ERR(1, 1304, __pyx_L1_error)
   17068           0 :     __pyx_v_tmpdata = __pyx_t_7;
   17069             : 
   17070             :     /* "View.MemoryView":1305
   17071             :  * 
   17072             :  *         tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
   17073             :  *         src = tmp             # <<<<<<<<<<<<<<
   17074             :  * 
   17075             :  *     if not broadcasting:
   17076             :  */
   17077           0 :     __pyx_v_src = __pyx_v_tmp;
   17078             : 
   17079             :     /* "View.MemoryView":1299
   17080             :  *             _err_dim(PyExc_ValueError, "Dimension %d is not direct", i)
   17081             :  * 
   17082             :  *     if slices_overlap(&src, &dst, ndim, itemsize):             # <<<<<<<<<<<<<<
   17083             :  * 
   17084             :  *         if not slice_is_contig(src, order, ndim):
   17085             :  */
   17086             :   }
   17087             : 
   17088             :   /* "View.MemoryView":1307
   17089             :  *         src = tmp
   17090             :  * 
   17091             :  *     if not broadcasting:             # <<<<<<<<<<<<<<
   17092             :  * 
   17093             :  * 
   17094             :  */
   17095           0 :   __pyx_t_2 = (!__pyx_v_broadcasting);
   17096           0 :   if (__pyx_t_2) {
   17097             : 
   17098             :     /* "View.MemoryView":1310
   17099             :  * 
   17100             :  * 
   17101             :  *         if slice_is_contig(src, 'C', ndim):             # <<<<<<<<<<<<<<
   17102             :  *             direct_copy = slice_is_contig(dst, 'C', ndim)
   17103             :  *         elif slice_is_contig(src, 'F', ndim):
   17104             :  */
   17105           0 :     __pyx_t_2 = __pyx_memviewslice_is_contig(__pyx_v_src, 'C', __pyx_v_ndim);
   17106           0 :     if (__pyx_t_2) {
   17107             : 
   17108             :       /* "View.MemoryView":1311
   17109             :  * 
   17110             :  *         if slice_is_contig(src, 'C', ndim):
   17111             :  *             direct_copy = slice_is_contig(dst, 'C', ndim)             # <<<<<<<<<<<<<<
   17112             :  *         elif slice_is_contig(src, 'F', ndim):
   17113             :  *             direct_copy = slice_is_contig(dst, 'F', ndim)
   17114             :  */
   17115           0 :       __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'C', __pyx_v_ndim);
   17116             : 
   17117             :       /* "View.MemoryView":1310
   17118             :  * 
   17119             :  * 
   17120             :  *         if slice_is_contig(src, 'C', ndim):             # <<<<<<<<<<<<<<
   17121             :  *             direct_copy = slice_is_contig(dst, 'C', ndim)
   17122             :  *         elif slice_is_contig(src, 'F', ndim):
   17123             :  */
   17124           0 :       goto __pyx_L12;
   17125             :     }
   17126             : 
   17127             :     /* "View.MemoryView":1312
   17128             :  *         if slice_is_contig(src, 'C', ndim):
   17129             :  *             direct_copy = slice_is_contig(dst, 'C', ndim)
   17130             :  *         elif slice_is_contig(src, 'F', ndim):             # <<<<<<<<<<<<<<
   17131             :  *             direct_copy = slice_is_contig(dst, 'F', ndim)
   17132             :  * 
   17133             :  */
   17134           0 :     __pyx_t_2 = __pyx_memviewslice_is_contig(__pyx_v_src, 'F', __pyx_v_ndim);
   17135           0 :     if (__pyx_t_2) {
   17136             : 
   17137             :       /* "View.MemoryView":1313
   17138             :  *             direct_copy = slice_is_contig(dst, 'C', ndim)
   17139             :  *         elif slice_is_contig(src, 'F', ndim):
   17140             :  *             direct_copy = slice_is_contig(dst, 'F', ndim)             # <<<<<<<<<<<<<<
   17141             :  * 
   17142             :  *         if direct_copy:
   17143             :  */
   17144           0 :       __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'F', __pyx_v_ndim);
   17145             : 
   17146             :       /* "View.MemoryView":1312
   17147             :  *         if slice_is_contig(src, 'C', ndim):
   17148             :  *             direct_copy = slice_is_contig(dst, 'C', ndim)
   17149             :  *         elif slice_is_contig(src, 'F', ndim):             # <<<<<<<<<<<<<<
   17150             :  *             direct_copy = slice_is_contig(dst, 'F', ndim)
   17151             :  * 
   17152             :  */
   17153             :     }
   17154           0 :     __pyx_L12:;
   17155             : 
   17156             :     /* "View.MemoryView":1315
   17157             :  *             direct_copy = slice_is_contig(dst, 'F', ndim)
   17158             :  * 
   17159             :  *         if direct_copy:             # <<<<<<<<<<<<<<
   17160             :  * 
   17161             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)
   17162             :  */
   17163           0 :     if (__pyx_v_direct_copy) {
   17164             : 
   17165             :       /* "View.MemoryView":1317
   17166             :  *         if direct_copy:
   17167             :  * 
   17168             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)             # <<<<<<<<<<<<<<
   17169             :  *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
   17170             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)
   17171             :  */
   17172           0 :       __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
   17173             : 
   17174             :       /* "View.MemoryView":1318
   17175             :  * 
   17176             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)
   17177             :  *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))             # <<<<<<<<<<<<<<
   17178             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)
   17179             :  *             free(tmpdata)
   17180             :  */
   17181           0 :       (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim)));
   17182             : 
   17183             :       /* "View.MemoryView":1319
   17184             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)
   17185             :  *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
   17186             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)             # <<<<<<<<<<<<<<
   17187             :  *             free(tmpdata)
   17188             :  *             return 0
   17189             :  */
   17190           0 :       __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
   17191             : 
   17192             :       /* "View.MemoryView":1320
   17193             :  *             memcpy(dst.data, src.data, slice_get_size(&src, ndim))
   17194             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)
   17195             :  *             free(tmpdata)             # <<<<<<<<<<<<<<
   17196             :  *             return 0
   17197             :  * 
   17198             :  */
   17199           0 :       free(__pyx_v_tmpdata);
   17200             : 
   17201             :       /* "View.MemoryView":1321
   17202             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=True)
   17203             :  *             free(tmpdata)
   17204             :  *             return 0             # <<<<<<<<<<<<<<
   17205             :  * 
   17206             :  *     if order == 'F' == get_best_order(&dst, ndim):
   17207             :  */
   17208           0 :       __pyx_r = 0;
   17209           0 :       goto __pyx_L0;
   17210             : 
   17211             :       /* "View.MemoryView":1315
   17212             :  *             direct_copy = slice_is_contig(dst, 'F', ndim)
   17213             :  * 
   17214             :  *         if direct_copy:             # <<<<<<<<<<<<<<
   17215             :  * 
   17216             :  *             refcount_copying(&dst, dtype_is_object, ndim, inc=False)
   17217             :  */
   17218             :     }
   17219             : 
   17220             :     /* "View.MemoryView":1307
   17221             :  *         src = tmp
   17222             :  * 
   17223             :  *     if not broadcasting:             # <<<<<<<<<<<<<<
   17224             :  * 
   17225             :  * 
   17226             :  */
   17227             :   }
   17228             : 
   17229             :   /* "View.MemoryView":1323
   17230             :  *             return 0
   17231             :  * 
   17232             :  *     if order == 'F' == get_best_order(&dst, ndim):             # <<<<<<<<<<<<<<
   17233             :  * 
   17234             :  * 
   17235             :  */
   17236           0 :   __pyx_t_2 = (__pyx_v_order == 'F');
   17237           0 :   if (__pyx_t_2) {
   17238           0 :     __pyx_t_2 = ('F' == __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim));
   17239             :   }
   17240           0 :   if (__pyx_t_2) {
   17241             : 
   17242             :     /* "View.MemoryView":1326
   17243             :  * 
   17244             :  * 
   17245             :  *         transpose_memslice(&src)             # <<<<<<<<<<<<<<
   17246             :  *         transpose_memslice(&dst)
   17247             :  * 
   17248             :  */
   17249           0 :     __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 1326, __pyx_L1_error)
   17250             : 
   17251             :     /* "View.MemoryView":1327
   17252             :  * 
   17253             :  *         transpose_memslice(&src)
   17254             :  *         transpose_memslice(&dst)             # <<<<<<<<<<<<<<
   17255             :  * 
   17256             :  *     refcount_copying(&dst, dtype_is_object, ndim, inc=False)
   17257             :  */
   17258           0 :     __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_dst)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 1327, __pyx_L1_error)
   17259             : 
   17260             :     /* "View.MemoryView":1323
   17261             :  *             return 0
   17262             :  * 
   17263             :  *     if order == 'F' == get_best_order(&dst, ndim):             # <<<<<<<<<<<<<<
   17264             :  * 
   17265             :  * 
   17266             :  */
   17267             :   }
   17268             : 
   17269             :   /* "View.MemoryView":1329
   17270             :  *         transpose_memslice(&dst)
   17271             :  * 
   17272             :  *     refcount_copying(&dst, dtype_is_object, ndim, inc=False)             # <<<<<<<<<<<<<<
   17273             :  *     copy_strided_to_strided(&src, &dst, ndim, itemsize)
   17274             :  *     refcount_copying(&dst, dtype_is_object, ndim, inc=True)
   17275             :  */
   17276           0 :   __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
   17277             : 
   17278             :   /* "View.MemoryView":1330
   17279             :  * 
   17280             :  *     refcount_copying(&dst, dtype_is_object, ndim, inc=False)
   17281             :  *     copy_strided_to_strided(&src, &dst, ndim, itemsize)             # <<<<<<<<<<<<<<
   17282             :  *     refcount_copying(&dst, dtype_is_object, ndim, inc=True)
   17283             :  * 
   17284             :  */
   17285           0 :   copy_strided_to_strided((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);
   17286             : 
   17287             :   /* "View.MemoryView":1331
   17288             :  *     refcount_copying(&dst, dtype_is_object, ndim, inc=False)
   17289             :  *     copy_strided_to_strided(&src, &dst, ndim, itemsize)
   17290             :  *     refcount_copying(&dst, dtype_is_object, ndim, inc=True)             # <<<<<<<<<<<<<<
   17291             :  * 
   17292             :  *     free(tmpdata)
   17293             :  */
   17294           0 :   __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
   17295             : 
   17296             :   /* "View.MemoryView":1333
   17297             :  *     refcount_copying(&dst, dtype_is_object, ndim, inc=True)
   17298             :  * 
   17299             :  *     free(tmpdata)             # <<<<<<<<<<<<<<
   17300             :  *     return 0
   17301             :  * 
   17302             :  */
   17303           0 :   free(__pyx_v_tmpdata);
   17304             : 
   17305             :   /* "View.MemoryView":1334
   17306             :  * 
   17307             :  *     free(tmpdata)
   17308             :  *     return 0             # <<<<<<<<<<<<<<
   17309             :  * 
   17310             :  * @cname('__pyx_memoryview_broadcast_leading')
   17311             :  */
   17312           0 :   __pyx_r = 0;
   17313           0 :   goto __pyx_L0;
   17314             : 
   17315             :   /* "View.MemoryView":1265
   17316             :  * 
   17317             :  * @cname('__pyx_memoryview_copy_contents')
   17318             :  * cdef int memoryview_copy_contents(__Pyx_memviewslice src,             # <<<<<<<<<<<<<<
   17319             :  *                                   __Pyx_memviewslice dst,
   17320             :  *                                   int src_ndim, int dst_ndim,
   17321             :  */
   17322             : 
   17323             :   /* function exit code */
   17324           0 :   __pyx_L1_error:;
   17325             :   #ifdef WITH_THREAD
   17326           0 :   __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   17327             :   #endif
   17328           0 :   __Pyx_AddTraceback("View.MemoryView.memoryview_copy_contents", __pyx_clineno, __pyx_lineno, __pyx_filename);
   17329           0 :   __pyx_r = -1;
   17330             :   #ifdef WITH_THREAD
   17331           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   17332             :   #endif
   17333           0 :   __pyx_L0:;
   17334           0 :   return __pyx_r;
   17335             : }
   17336             : 
   17337             : /* "View.MemoryView":1337
   17338             :  * 
   17339             :  * @cname('__pyx_memoryview_broadcast_leading')
   17340             :  * cdef void broadcast_leading(__Pyx_memviewslice *mslice,             # <<<<<<<<<<<<<<
   17341             :  *                             int ndim,
   17342             :  *                             int ndim_other) noexcept nogil:
   17343             :  */
   17344             : 
   17345           0 : static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim, int __pyx_v_ndim_other) {
   17346           0 :   int __pyx_v_i;
   17347           0 :   int __pyx_v_offset;
   17348           0 :   int __pyx_t_1;
   17349           0 :   int __pyx_t_2;
   17350           0 :   int __pyx_t_3;
   17351             : 
   17352             :   /* "View.MemoryView":1341
   17353             :  *                             int ndim_other) noexcept nogil:
   17354             :  *     cdef int i
   17355             :  *     cdef int offset = ndim_other - ndim             # <<<<<<<<<<<<<<
   17356             :  * 
   17357             :  *     for i in range(ndim - 1, -1, -1):
   17358             :  */
   17359           0 :   __pyx_v_offset = (__pyx_v_ndim_other - __pyx_v_ndim);
   17360             : 
   17361             :   /* "View.MemoryView":1343
   17362             :  *     cdef int offset = ndim_other - ndim
   17363             :  * 
   17364             :  *     for i in range(ndim - 1, -1, -1):             # <<<<<<<<<<<<<<
   17365             :  *         mslice.shape[i + offset] = mslice.shape[i]
   17366             :  *         mslice.strides[i + offset] = mslice.strides[i]
   17367             :  */
   17368           0 :   for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
   17369           0 :     __pyx_v_i = __pyx_t_1;
   17370             : 
   17371             :     /* "View.MemoryView":1344
   17372             :  * 
   17373             :  *     for i in range(ndim - 1, -1, -1):
   17374             :  *         mslice.shape[i + offset] = mslice.shape[i]             # <<<<<<<<<<<<<<
   17375             :  *         mslice.strides[i + offset] = mslice.strides[i]
   17376             :  *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
   17377             :  */
   17378           0 :     (__pyx_v_mslice->shape[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->shape[__pyx_v_i]);
   17379             : 
   17380             :     /* "View.MemoryView":1345
   17381             :  *     for i in range(ndim - 1, -1, -1):
   17382             :  *         mslice.shape[i + offset] = mslice.shape[i]
   17383             :  *         mslice.strides[i + offset] = mslice.strides[i]             # <<<<<<<<<<<<<<
   17384             :  *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
   17385             :  * 
   17386             :  */
   17387           0 :     (__pyx_v_mslice->strides[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->strides[__pyx_v_i]);
   17388             : 
   17389             :     /* "View.MemoryView":1346
   17390             :  *         mslice.shape[i + offset] = mslice.shape[i]
   17391             :  *         mslice.strides[i + offset] = mslice.strides[i]
   17392             :  *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]             # <<<<<<<<<<<<<<
   17393             :  * 
   17394             :  *     for i in range(offset):
   17395             :  */
   17396           0 :     (__pyx_v_mslice->suboffsets[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->suboffsets[__pyx_v_i]);
   17397             :   }
   17398             : 
   17399             :   /* "View.MemoryView":1348
   17400             :  *         mslice.suboffsets[i + offset] = mslice.suboffsets[i]
   17401             :  * 
   17402             :  *     for i in range(offset):             # <<<<<<<<<<<<<<
   17403             :  *         mslice.shape[i] = 1
   17404             :  *         mslice.strides[i] = mslice.strides[0]
   17405             :  */
   17406           0 :   __pyx_t_1 = __pyx_v_offset;
   17407             :   __pyx_t_2 = __pyx_t_1;
   17408           0 :   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
   17409           0 :     __pyx_v_i = __pyx_t_3;
   17410             : 
   17411             :     /* "View.MemoryView":1349
   17412             :  * 
   17413             :  *     for i in range(offset):
   17414             :  *         mslice.shape[i] = 1             # <<<<<<<<<<<<<<
   17415             :  *         mslice.strides[i] = mslice.strides[0]
   17416             :  *         mslice.suboffsets[i] = -1
   17417             :  */
   17418           0 :     (__pyx_v_mslice->shape[__pyx_v_i]) = 1;
   17419             : 
   17420             :     /* "View.MemoryView":1350
   17421             :  *     for i in range(offset):
   17422             :  *         mslice.shape[i] = 1
   17423             :  *         mslice.strides[i] = mslice.strides[0]             # <<<<<<<<<<<<<<
   17424             :  *         mslice.suboffsets[i] = -1
   17425             :  * 
   17426             :  */
   17427           0 :     (__pyx_v_mslice->strides[__pyx_v_i]) = (__pyx_v_mslice->strides[0]);
   17428             : 
   17429             :     /* "View.MemoryView":1351
   17430             :  *         mslice.shape[i] = 1
   17431             :  *         mslice.strides[i] = mslice.strides[0]
   17432             :  *         mslice.suboffsets[i] = -1             # <<<<<<<<<<<<<<
   17433             :  * 
   17434             :  * 
   17435             :  */
   17436           0 :     (__pyx_v_mslice->suboffsets[__pyx_v_i]) = -1L;
   17437             :   }
   17438             : 
   17439             :   /* "View.MemoryView":1337
   17440             :  * 
   17441             :  * @cname('__pyx_memoryview_broadcast_leading')
   17442             :  * cdef void broadcast_leading(__Pyx_memviewslice *mslice,             # <<<<<<<<<<<<<<
   17443             :  *                             int ndim,
   17444             :  *                             int ndim_other) noexcept nogil:
   17445             :  */
   17446             : 
   17447             :   /* function exit code */
   17448           0 : }
   17449             : 
   17450             : /* "View.MemoryView":1359
   17451             :  * 
   17452             :  * @cname('__pyx_memoryview_refcount_copying')
   17453             :  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil:             # <<<<<<<<<<<<<<
   17454             :  * 
   17455             :  *     if dtype_is_object:
   17456             :  */
   17457             : 
   17458           0 : static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_dtype_is_object, int __pyx_v_ndim, int __pyx_v_inc) {
   17459             : 
   17460             :   /* "View.MemoryView":1361
   17461             :  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil:
   17462             :  * 
   17463             :  *     if dtype_is_object:             # <<<<<<<<<<<<<<
   17464             :  *         refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc)
   17465             :  * 
   17466             :  */
   17467           0 :   if (__pyx_v_dtype_is_object) {
   17468             : 
   17469             :     /* "View.MemoryView":1362
   17470             :  * 
   17471             :  *     if dtype_is_object:
   17472             :  *         refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc)             # <<<<<<<<<<<<<<
   17473             :  * 
   17474             :  * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
   17475             :  */
   17476           0 :     __pyx_memoryview_refcount_objects_in_slice_with_gil(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_inc);
   17477             : 
   17478             :     /* "View.MemoryView":1361
   17479             :  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil:
   17480             :  * 
   17481             :  *     if dtype_is_object:             # <<<<<<<<<<<<<<
   17482             :  *         refcount_objects_in_slice_with_gil(dst.data, dst.shape, dst.strides, ndim, inc)
   17483             :  * 
   17484             :  */
   17485             :   }
   17486             : 
   17487             :   /* "View.MemoryView":1359
   17488             :  * 
   17489             :  * @cname('__pyx_memoryview_refcount_copying')
   17490             :  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, int ndim, bint inc) noexcept nogil:             # <<<<<<<<<<<<<<
   17491             :  * 
   17492             :  *     if dtype_is_object:
   17493             :  */
   17494             : 
   17495             :   /* function exit code */
   17496           0 : }
   17497             : 
   17498             : /* "View.MemoryView":1365
   17499             :  * 
   17500             :  * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
   17501             :  * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
   17502             :  *                                              Py_ssize_t *strides, int ndim,
   17503             :  *                                              bint inc) noexcept with gil:
   17504             :  */
   17505             : 
   17506           0 : static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
   17507             :   #ifdef WITH_THREAD
   17508           0 :   PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
   17509             :   #endif
   17510             : 
   17511             :   /* "View.MemoryView":1368
   17512             :  *                                              Py_ssize_t *strides, int ndim,
   17513             :  *                                              bint inc) noexcept with gil:
   17514             :  *     refcount_objects_in_slice(data, shape, strides, ndim, inc)             # <<<<<<<<<<<<<<
   17515             :  * 
   17516             :  * @cname('__pyx_memoryview_refcount_objects_in_slice')
   17517             :  */
   17518           0 :   __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, __pyx_v_shape, __pyx_v_strides, __pyx_v_ndim, __pyx_v_inc);
   17519             : 
   17520             :   /* "View.MemoryView":1365
   17521             :  * 
   17522             :  * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
   17523             :  * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
   17524             :  *                                              Py_ssize_t *strides, int ndim,
   17525             :  *                                              bint inc) noexcept with gil:
   17526             :  */
   17527             : 
   17528             :   /* function exit code */
   17529             :   #ifdef WITH_THREAD
   17530           0 :   __Pyx_PyGILState_Release(__pyx_gilstate_save);
   17531             :   #endif
   17532           0 : }
   17533             : 
   17534             : /* "View.MemoryView":1371
   17535             :  * 
   17536             :  * @cname('__pyx_memoryview_refcount_objects_in_slice')
   17537             :  * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
   17538             :  *                                     Py_ssize_t *strides, int ndim, bint inc) noexcept:
   17539             :  *     cdef Py_ssize_t i
   17540             :  */
   17541             : 
   17542           0 : static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
   17543           0 :   CYTHON_UNUSED Py_ssize_t __pyx_v_i;
   17544           0 :   Py_ssize_t __pyx_v_stride;
   17545           0 :   Py_ssize_t __pyx_t_1;
   17546           0 :   Py_ssize_t __pyx_t_2;
   17547           0 :   Py_ssize_t __pyx_t_3;
   17548           0 :   int __pyx_t_4;
   17549             : 
   17550             :   /* "View.MemoryView":1374
   17551             :  *                                     Py_ssize_t *strides, int ndim, bint inc) noexcept:
   17552             :  *     cdef Py_ssize_t i
   17553             :  *     cdef Py_ssize_t stride = strides[0]             # <<<<<<<<<<<<<<
   17554             :  * 
   17555             :  *     for i in range(shape[0]):
   17556             :  */
   17557           0 :   __pyx_v_stride = (__pyx_v_strides[0]);
   17558             : 
   17559             :   /* "View.MemoryView":1376
   17560             :  *     cdef Py_ssize_t stride = strides[0]
   17561             :  * 
   17562             :  *     for i in range(shape[0]):             # <<<<<<<<<<<<<<
   17563             :  *         if ndim == 1:
   17564             :  *             if inc:
   17565             :  */
   17566           0 :   __pyx_t_1 = (__pyx_v_shape[0]);
   17567           0 :   __pyx_t_2 = __pyx_t_1;
   17568           0 :   for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
   17569           0 :     __pyx_v_i = __pyx_t_3;
   17570             : 
   17571             :     /* "View.MemoryView":1377
   17572             :  * 
   17573             :  *     for i in range(shape[0]):
   17574             :  *         if ndim == 1:             # <<<<<<<<<<<<<<
   17575             :  *             if inc:
   17576             :  *                 Py_INCREF((<PyObject **> data)[0])
   17577             :  */
   17578           0 :     __pyx_t_4 = (__pyx_v_ndim == 1);
   17579           0 :     if (__pyx_t_4) {
   17580             : 
   17581             :       /* "View.MemoryView":1378
   17582             :  *     for i in range(shape[0]):
   17583             :  *         if ndim == 1:
   17584             :  *             if inc:             # <<<<<<<<<<<<<<
   17585             :  *                 Py_INCREF((<PyObject **> data)[0])
   17586             :  *             else:
   17587             :  */
   17588           0 :       if (__pyx_v_inc) {
   17589             : 
   17590             :         /* "View.MemoryView":1379
   17591             :  *         if ndim == 1:
   17592             :  *             if inc:
   17593             :  *                 Py_INCREF((<PyObject **> data)[0])             # <<<<<<<<<<<<<<
   17594             :  *             else:
   17595             :  *                 Py_DECREF((<PyObject **> data)[0])
   17596             :  */
   17597           0 :         Py_INCREF((((PyObject **)__pyx_v_data)[0]));
   17598             : 
   17599             :         /* "View.MemoryView":1378
   17600             :  *     for i in range(shape[0]):
   17601             :  *         if ndim == 1:
   17602             :  *             if inc:             # <<<<<<<<<<<<<<
   17603             :  *                 Py_INCREF((<PyObject **> data)[0])
   17604             :  *             else:
   17605             :  */
   17606           0 :         goto __pyx_L6;
   17607             :       }
   17608             : 
   17609             :       /* "View.MemoryView":1381
   17610             :  *                 Py_INCREF((<PyObject **> data)[0])
   17611             :  *             else:
   17612             :  *                 Py_DECREF((<PyObject **> data)[0])             # <<<<<<<<<<<<<<
   17613             :  *         else:
   17614             :  *             refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc)
   17615             :  */
   17616             :       /*else*/ {
   17617           0 :         Py_DECREF((((PyObject **)__pyx_v_data)[0]));
   17618             :       }
   17619           0 :       __pyx_L6:;
   17620             : 
   17621             :       /* "View.MemoryView":1377
   17622             :  * 
   17623             :  *     for i in range(shape[0]):
   17624             :  *         if ndim == 1:             # <<<<<<<<<<<<<<
   17625             :  *             if inc:
   17626             :  *                 Py_INCREF((<PyObject **> data)[0])
   17627             :  */
   17628           0 :       goto __pyx_L5;
   17629             :     }
   17630             : 
   17631             :     /* "View.MemoryView":1383
   17632             :  *                 Py_DECREF((<PyObject **> data)[0])
   17633             :  *         else:
   17634             :  *             refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc)             # <<<<<<<<<<<<<<
   17635             :  * 
   17636             :  *         data += stride
   17637             :  */
   17638             :     /*else*/ {
   17639           0 :       __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_inc);
   17640             :     }
   17641           0 :     __pyx_L5:;
   17642             : 
   17643             :     /* "View.MemoryView":1385
   17644             :  *             refcount_objects_in_slice(data, shape + 1, strides + 1, ndim - 1, inc)
   17645             :  * 
   17646             :  *         data += stride             # <<<<<<<<<<<<<<
   17647             :  * 
   17648             :  * 
   17649             :  */
   17650           0 :     __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
   17651             :   }
   17652             : 
   17653             :   /* "View.MemoryView":1371
   17654             :  * 
   17655             :  * @cname('__pyx_memoryview_refcount_objects_in_slice')
   17656             :  * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
   17657             :  *                                     Py_ssize_t *strides, int ndim, bint inc) noexcept:
   17658             :  *     cdef Py_ssize_t i
   17659             :  */
   17660             : 
   17661             :   /* function exit code */
   17662           0 : }
   17663             : 
   17664             : /* "View.MemoryView":1391
   17665             :  * 
   17666             :  * @cname('__pyx_memoryview_slice_assign_scalar')
   17667             :  * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim,             # <<<<<<<<<<<<<<
   17668             :  *                               size_t itemsize, void *item,
   17669             :  *                               bint dtype_is_object) noexcept nogil:
   17670             :  */
   17671             : 
   17672           0 : static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item, int __pyx_v_dtype_is_object) {
   17673             : 
   17674             :   /* "View.MemoryView":1394
   17675             :  *                               size_t itemsize, void *item,
   17676             :  *                               bint dtype_is_object) noexcept nogil:
   17677             :  *     refcount_copying(dst, dtype_is_object, ndim, inc=False)             # <<<<<<<<<<<<<<
   17678             :  *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item)
   17679             :  *     refcount_copying(dst, dtype_is_object, ndim, inc=True)
   17680             :  */
   17681           0 :   __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
   17682             : 
   17683             :   /* "View.MemoryView":1395
   17684             :  *                               bint dtype_is_object) noexcept nogil:
   17685             :  *     refcount_copying(dst, dtype_is_object, ndim, inc=False)
   17686             :  *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item)             # <<<<<<<<<<<<<<
   17687             :  *     refcount_copying(dst, dtype_is_object, ndim, inc=True)
   17688             :  * 
   17689             :  */
   17690           0 :   __pyx_memoryview__slice_assign_scalar(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_itemsize, __pyx_v_item);
   17691             : 
   17692             :   /* "View.MemoryView":1396
   17693             :  *     refcount_copying(dst, dtype_is_object, ndim, inc=False)
   17694             :  *     _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, itemsize, item)
   17695             :  *     refcount_copying(dst, dtype_is_object, ndim, inc=True)             # <<<<<<<<<<<<<<
   17696             :  * 
   17697             :  * 
   17698             :  */
   17699           0 :   __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
   17700             : 
   17701             :   /* "View.MemoryView":1391
   17702             :  * 
   17703             :  * @cname('__pyx_memoryview_slice_assign_scalar')
   17704             :  * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim,             # <<<<<<<<<<<<<<
   17705             :  *                               size_t itemsize, void *item,
   17706             :  *                               bint dtype_is_object) noexcept nogil:
   17707             :  */
   17708             : 
   17709             :   /* function exit code */
   17710           0 : }
   17711             : 
   17712             : /* "View.MemoryView":1400
   17713             :  * 
   17714             :  * @cname('__pyx_memoryview__slice_assign_scalar')
   17715             :  * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
   17716             :  *                               Py_ssize_t *strides, int ndim,
   17717             :  *                               size_t itemsize, void *item) noexcept nogil:
   17718             :  */
   17719             : 
   17720           0 : static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item) {
   17721           0 :   CYTHON_UNUSED Py_ssize_t __pyx_v_i;
   17722           0 :   Py_ssize_t __pyx_v_stride;
   17723           0 :   Py_ssize_t __pyx_v_extent;
   17724           0 :   int __pyx_t_1;
   17725           0 :   Py_ssize_t __pyx_t_2;
   17726           0 :   Py_ssize_t __pyx_t_3;
   17727           0 :   Py_ssize_t __pyx_t_4;
   17728             : 
   17729             :   /* "View.MemoryView":1404
   17730             :  *                               size_t itemsize, void *item) noexcept nogil:
   17731             :  *     cdef Py_ssize_t i
   17732             :  *     cdef Py_ssize_t stride = strides[0]             # <<<<<<<<<<<<<<
   17733             :  *     cdef Py_ssize_t extent = shape[0]
   17734             :  * 
   17735             :  */
   17736           0 :   __pyx_v_stride = (__pyx_v_strides[0]);
   17737             : 
   17738             :   /* "View.MemoryView":1405
   17739             :  *     cdef Py_ssize_t i
   17740             :  *     cdef Py_ssize_t stride = strides[0]
   17741             :  *     cdef Py_ssize_t extent = shape[0]             # <<<<<<<<<<<<<<
   17742             :  * 
   17743             :  *     if ndim == 1:
   17744             :  */
   17745           0 :   __pyx_v_extent = (__pyx_v_shape[0]);
   17746             : 
   17747             :   /* "View.MemoryView":1407
   17748             :  *     cdef Py_ssize_t extent = shape[0]
   17749             :  * 
   17750             :  *     if ndim == 1:             # <<<<<<<<<<<<<<
   17751             :  *         for i in range(extent):
   17752             :  *             memcpy(data, item, itemsize)
   17753             :  */
   17754           0 :   __pyx_t_1 = (__pyx_v_ndim == 1);
   17755           0 :   if (__pyx_t_1) {
   17756             : 
   17757             :     /* "View.MemoryView":1408
   17758             :  * 
   17759             :  *     if ndim == 1:
   17760             :  *         for i in range(extent):             # <<<<<<<<<<<<<<
   17761             :  *             memcpy(data, item, itemsize)
   17762             :  *             data += stride
   17763             :  */
   17764             :     __pyx_t_2 = __pyx_v_extent;
   17765             :     __pyx_t_3 = __pyx_t_2;
   17766           0 :     for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
   17767           0 :       __pyx_v_i = __pyx_t_4;
   17768             : 
   17769             :       /* "View.MemoryView":1409
   17770             :  *     if ndim == 1:
   17771             :  *         for i in range(extent):
   17772             :  *             memcpy(data, item, itemsize)             # <<<<<<<<<<<<<<
   17773             :  *             data += stride
   17774             :  *     else:
   17775             :  */
   17776           0 :       (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize));
   17777             : 
   17778             :       /* "View.MemoryView":1410
   17779             :  *         for i in range(extent):
   17780             :  *             memcpy(data, item, itemsize)
   17781             :  *             data += stride             # <<<<<<<<<<<<<<
   17782             :  *     else:
   17783             :  *         for i in range(extent):
   17784             :  */
   17785           0 :       __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
   17786             :     }
   17787             : 
   17788             :     /* "View.MemoryView":1407
   17789             :  *     cdef Py_ssize_t extent = shape[0]
   17790             :  * 
   17791             :  *     if ndim == 1:             # <<<<<<<<<<<<<<
   17792             :  *         for i in range(extent):
   17793             :  *             memcpy(data, item, itemsize)
   17794             :  */
   17795           0 :     goto __pyx_L3;
   17796             :   }
   17797             : 
   17798             :   /* "View.MemoryView":1412
   17799             :  *             data += stride
   17800             :  *     else:
   17801             :  *         for i in range(extent):             # <<<<<<<<<<<<<<
   17802             :  *             _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item)
   17803             :  *             data += stride
   17804             :  */
   17805             :   /*else*/ {
   17806             :     __pyx_t_2 = __pyx_v_extent;
   17807             :     __pyx_t_3 = __pyx_t_2;
   17808           0 :     for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
   17809           0 :       __pyx_v_i = __pyx_t_4;
   17810             : 
   17811             :       /* "View.MemoryView":1413
   17812             :  *     else:
   17813             :  *         for i in range(extent):
   17814             :  *             _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item)             # <<<<<<<<<<<<<<
   17815             :  *             data += stride
   17816             :  * 
   17817             :  */
   17818           0 :       __pyx_memoryview__slice_assign_scalar(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize, __pyx_v_item);
   17819             : 
   17820             :       /* "View.MemoryView":1414
   17821             :  *         for i in range(extent):
   17822             :  *             _slice_assign_scalar(data, shape + 1, strides + 1, ndim - 1, itemsize, item)
   17823             :  *             data += stride             # <<<<<<<<<<<<<<
   17824             :  * 
   17825             :  * 
   17826             :  */
   17827           0 :       __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
   17828             :     }
   17829             :   }
   17830           0 :   __pyx_L3:;
   17831             : 
   17832             :   /* "View.MemoryView":1400
   17833             :  * 
   17834             :  * @cname('__pyx_memoryview__slice_assign_scalar')
   17835             :  * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape,             # <<<<<<<<<<<<<<
   17836             :  *                               Py_ssize_t *strides, int ndim,
   17837             :  *                               size_t itemsize, void *item) noexcept nogil:
   17838             :  */
   17839             : 
   17840             :   /* function exit code */
   17841           0 : }
   17842             : 
   17843             : /* "(tree fragment)":1
   17844             :  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
   17845             :  *     cdef object __pyx_PickleError
   17846             :  *     cdef object __pyx_result
   17847             :  */
   17848             : 
   17849             : /* Python wrapper */
   17850             : static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, 
   17851             : #if CYTHON_METH_FASTCALL
   17852             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   17853             : #else
   17854             : PyObject *__pyx_args, PyObject *__pyx_kwds
   17855             : #endif
   17856             : ); /*proto*/
   17857             : static PyMethodDef __pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum = {"__pyx_unpickle_Enum", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
   17858           0 : static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, 
   17859             : #if CYTHON_METH_FASTCALL
   17860             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   17861             : #else
   17862             : PyObject *__pyx_args, PyObject *__pyx_kwds
   17863             : #endif
   17864             : ) {
   17865           0 :   PyObject *__pyx_v___pyx_type = 0;
   17866           0 :   long __pyx_v___pyx_checksum;
   17867           0 :   PyObject *__pyx_v___pyx_state = 0;
   17868             :   #if !CYTHON_METH_FASTCALL
   17869             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   17870             :   #endif
   17871           0 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   17872           0 :   PyObject* values[3] = {0,0,0};
   17873           0 :   int __pyx_lineno = 0;
   17874           0 :   const char *__pyx_filename = NULL;
   17875           0 :   int __pyx_clineno = 0;
   17876           0 :   PyObject *__pyx_r = 0;
   17877             :   __Pyx_RefNannyDeclarations
   17878           0 :   __Pyx_RefNannySetupContext("__pyx_unpickle_Enum (wrapper)", 0);
   17879             :   #if !CYTHON_METH_FASTCALL
   17880             :   #if CYTHON_ASSUME_SAFE_MACROS
   17881             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   17882             :   #else
   17883             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   17884             :   #endif
   17885             :   #endif
   17886           0 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   17887             :   {
   17888           0 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
   17889           0 :     if (__pyx_kwds) {
   17890           0 :       Py_ssize_t kw_args;
   17891           0 :       switch (__pyx_nargs) {
   17892           0 :         case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
   17893           0 :         CYTHON_FALLTHROUGH;
   17894           0 :         case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   17895           0 :         CYTHON_FALLTHROUGH;
   17896           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   17897           0 :         CYTHON_FALLTHROUGH;
   17898           0 :         case  0: break;
   17899           0 :         default: goto __pyx_L5_argtuple_error;
   17900             :       }
   17901           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   17902           0 :       switch (__pyx_nargs) {
   17903           0 :         case  0:
   17904           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
   17905           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   17906           0 :           kw_args--;
   17907             :         }
   17908           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
   17909           0 :         else goto __pyx_L5_argtuple_error;
   17910           0 :         CYTHON_FALLTHROUGH;
   17911             :         case  1:
   17912           0 :         if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
   17913           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
   17914           0 :           kw_args--;
   17915             :         }
   17916           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
   17917             :         else {
   17918           0 :           __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
   17919             :         }
   17920           0 :         CYTHON_FALLTHROUGH;
   17921             :         case  2:
   17922           0 :         if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
   17923           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
   17924           0 :           kw_args--;
   17925             :         }
   17926           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
   17927             :         else {
   17928           0 :           __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
   17929             :         }
   17930             :       }
   17931           0 :       if (unlikely(kw_args > 0)) {
   17932           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   17933           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_Enum") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
   17934             :       }
   17935           0 :     } else if (unlikely(__pyx_nargs != 3)) {
   17936           0 :       goto __pyx_L5_argtuple_error;
   17937             :     } else {
   17938           0 :       values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   17939           0 :       values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   17940           0 :       values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
   17941             :     }
   17942           0 :     __pyx_v___pyx_type = values[0];
   17943           0 :     __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
   17944           0 :     __pyx_v___pyx_state = values[2];
   17945             :   }
   17946           0 :   goto __pyx_L6_skip;
   17947           0 :   __pyx_L5_argtuple_error:;
   17948           0 :   __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error)
   17949           0 :   __pyx_L6_skip:;
   17950           0 :   goto __pyx_L4_argument_unpacking_done;
   17951           0 :   __pyx_L3_error:;
   17952             :   {
   17953           0 :     Py_ssize_t __pyx_temp;
   17954           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   17955             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   17956             :     }
   17957             :   }
   17958           0 :   __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
   17959           0 :   __Pyx_RefNannyFinishContext();
   17960           0 :   return NULL;
   17961           0 :   __pyx_L4_argument_unpacking_done:;
   17962           0 :   __pyx_r = __pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
   17963             : 
   17964             :   /* function exit code */
   17965             :   {
   17966           0 :     Py_ssize_t __pyx_temp;
   17967           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   17968             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   17969             :     }
   17970             :   }
   17971             :   __Pyx_RefNannyFinishContext();
   17972             :   return __pyx_r;
   17973             : }
   17974             : 
   17975           0 : static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
   17976           0 :   PyObject *__pyx_v___pyx_PickleError = 0;
   17977           0 :   PyObject *__pyx_v___pyx_result = 0;
   17978           0 :   PyObject *__pyx_r = NULL;
   17979             :   __Pyx_RefNannyDeclarations
   17980           0 :   PyObject *__pyx_t_1 = NULL;
   17981           0 :   int __pyx_t_2;
   17982           0 :   PyObject *__pyx_t_3 = NULL;
   17983           0 :   PyObject *__pyx_t_4 = NULL;
   17984           0 :   unsigned int __pyx_t_5;
   17985           0 :   int __pyx_lineno = 0;
   17986           0 :   const char *__pyx_filename = NULL;
   17987           0 :   int __pyx_clineno = 0;
   17988           0 :   __Pyx_RefNannySetupContext("__pyx_unpickle_Enum", 1);
   17989             : 
   17990             :   /* "(tree fragment)":4
   17991             :  *     cdef object __pyx_PickleError
   17992             :  *     cdef object __pyx_result
   17993             :  *     if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931):             # <<<<<<<<<<<<<<
   17994             :  *         from pickle import PickleError as __pyx_PickleError
   17995             :  *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
   17996             :  */
   17997           0 :   __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
   17998           0 :   __Pyx_GOTREF(__pyx_t_1);
   17999           0 :   __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__8, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 4, __pyx_L1_error)
   18000           0 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   18001           0 :   if (__pyx_t_2) {
   18002             : 
   18003             :     /* "(tree fragment)":5
   18004             :  *     cdef object __pyx_result
   18005             :  *     if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931):
   18006             :  *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
   18007             :  *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
   18008             :  *     __pyx_result = Enum.__new__(__pyx_type)
   18009             :  */
   18010           0 :     __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
   18011           0 :     __Pyx_GOTREF(__pyx_t_1);
   18012           0 :     __Pyx_INCREF(__pyx_n_s_PickleError);
   18013           0 :     __Pyx_GIVEREF(__pyx_n_s_PickleError);
   18014           0 :     if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(1, 5, __pyx_L1_error);
   18015           0 :     __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
   18016           0 :     __Pyx_GOTREF(__pyx_t_3);
   18017           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   18018           0 :     __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
   18019           0 :     __Pyx_GOTREF(__pyx_t_1);
   18020           0 :     __Pyx_INCREF(__pyx_t_1);
   18021           0 :     __pyx_v___pyx_PickleError = __pyx_t_1;
   18022           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   18023           0 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   18024             : 
   18025             :     /* "(tree fragment)":6
   18026             :  *     if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931):
   18027             :  *         from pickle import PickleError as __pyx_PickleError
   18028             :  *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum             # <<<<<<<<<<<<<<
   18029             :  *     __pyx_result = Enum.__new__(__pyx_type)
   18030             :  *     if __pyx_state is not None:
   18031             :  */
   18032           0 :     __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
   18033           0 :     __Pyx_GOTREF(__pyx_t_3);
   18034           0 :     __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
   18035           0 :     __Pyx_GOTREF(__pyx_t_1);
   18036           0 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   18037           0 :     __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
   18038           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   18039           0 :     __PYX_ERR(1, 6, __pyx_L1_error)
   18040             : 
   18041             :     /* "(tree fragment)":4
   18042             :  *     cdef object __pyx_PickleError
   18043             :  *     cdef object __pyx_result
   18044             :  *     if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931):             # <<<<<<<<<<<<<<
   18045             :  *         from pickle import PickleError as __pyx_PickleError
   18046             :  *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
   18047             :  */
   18048             :   }
   18049             : 
   18050             :   /* "(tree fragment)":7
   18051             :  *         from pickle import PickleError as __pyx_PickleError
   18052             :  *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
   18053             :  *     __pyx_result = Enum.__new__(__pyx_type)             # <<<<<<<<<<<<<<
   18054             :  *     if __pyx_state is not None:
   18055             :  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
   18056             :  */
   18057           0 :   __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_MemviewEnum_type), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
   18058           0 :   __Pyx_GOTREF(__pyx_t_3);
   18059           0 :   __pyx_t_4 = NULL;
   18060           0 :   __pyx_t_5 = 0;
   18061             :   #if CYTHON_UNPACK_METHODS
   18062           0 :   if (likely(PyMethod_Check(__pyx_t_3))) {
   18063           0 :     __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
   18064           0 :     if (likely(__pyx_t_4)) {
   18065           0 :       PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
   18066           0 :       __Pyx_INCREF(__pyx_t_4);
   18067           0 :       __Pyx_INCREF(function);
   18068           0 :       __Pyx_DECREF_SET(__pyx_t_3, function);
   18069             :       __pyx_t_5 = 1;
   18070             :     }
   18071             :   }
   18072             :   #endif
   18073             :   {
   18074           0 :     PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
   18075           0 :     __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
   18076           0 :     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
   18077           0 :     if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
   18078           0 :     __Pyx_GOTREF(__pyx_t_1);
   18079           0 :     __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
   18080             :   }
   18081           0 :   __pyx_v___pyx_result = __pyx_t_1;
   18082           0 :   __pyx_t_1 = 0;
   18083             : 
   18084             :   /* "(tree fragment)":8
   18085             :  *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
   18086             :  *     __pyx_result = Enum.__new__(__pyx_type)
   18087             :  *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
   18088             :  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
   18089             :  *     return __pyx_result
   18090             :  */
   18091           0 :   __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
   18092           0 :   if (__pyx_t_2) {
   18093             : 
   18094             :     /* "(tree fragment)":9
   18095             :  *     __pyx_result = Enum.__new__(__pyx_type)
   18096             :  *     if __pyx_state is not None:
   18097             :  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
   18098             :  *     return __pyx_result
   18099             :  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
   18100             :  */
   18101           0 :     if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 9, __pyx_L1_error)
   18102           0 :     __pyx_t_1 = __pyx_unpickle_Enum__set_state(((struct __pyx_MemviewEnum_obj *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
   18103           0 :     __Pyx_GOTREF(__pyx_t_1);
   18104           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   18105             : 
   18106             :     /* "(tree fragment)":8
   18107             :  *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
   18108             :  *     __pyx_result = Enum.__new__(__pyx_type)
   18109             :  *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
   18110             :  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
   18111             :  *     return __pyx_result
   18112             :  */
   18113             :   }
   18114             : 
   18115             :   /* "(tree fragment)":10
   18116             :  *     if __pyx_state is not None:
   18117             :  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
   18118             :  *     return __pyx_result             # <<<<<<<<<<<<<<
   18119             :  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
   18120             :  *     __pyx_result.name = __pyx_state[0]
   18121             :  */
   18122           0 :   __Pyx_XDECREF(__pyx_r);
   18123           0 :   __Pyx_INCREF(__pyx_v___pyx_result);
   18124           0 :   __pyx_r = __pyx_v___pyx_result;
   18125           0 :   goto __pyx_L0;
   18126             : 
   18127             :   /* "(tree fragment)":1
   18128             :  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
   18129             :  *     cdef object __pyx_PickleError
   18130             :  *     cdef object __pyx_result
   18131             :  */
   18132             : 
   18133             :   /* function exit code */
   18134           0 :   __pyx_L1_error:;
   18135           0 :   __Pyx_XDECREF(__pyx_t_1);
   18136           0 :   __Pyx_XDECREF(__pyx_t_3);
   18137           0 :   __Pyx_XDECREF(__pyx_t_4);
   18138           0 :   __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
   18139           0 :   __pyx_r = NULL;
   18140           0 :   __pyx_L0:;
   18141           0 :   __Pyx_XDECREF(__pyx_v___pyx_PickleError);
   18142           0 :   __Pyx_XDECREF(__pyx_v___pyx_result);
   18143           0 :   __Pyx_XGIVEREF(__pyx_r);
   18144           0 :   __Pyx_RefNannyFinishContext();
   18145           0 :   return __pyx_r;
   18146             : }
   18147             : 
   18148             : /* "(tree fragment)":11
   18149             :  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
   18150             :  *     return __pyx_result
   18151             :  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
   18152             :  *     __pyx_result.name = __pyx_state[0]
   18153             :  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
   18154             :  */
   18155             : 
   18156           0 : static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
   18157           0 :   PyObject *__pyx_r = NULL;
   18158             :   __Pyx_RefNannyDeclarations
   18159           0 :   PyObject *__pyx_t_1 = NULL;
   18160           0 :   int __pyx_t_2;
   18161           0 :   Py_ssize_t __pyx_t_3;
   18162           0 :   int __pyx_t_4;
   18163           0 :   PyObject *__pyx_t_5 = NULL;
   18164           0 :   PyObject *__pyx_t_6 = NULL;
   18165           0 :   PyObject *__pyx_t_7 = NULL;
   18166           0 :   unsigned int __pyx_t_8;
   18167           0 :   int __pyx_lineno = 0;
   18168           0 :   const char *__pyx_filename = NULL;
   18169           0 :   int __pyx_clineno = 0;
   18170           0 :   __Pyx_RefNannySetupContext("__pyx_unpickle_Enum__set_state", 1);
   18171             : 
   18172             :   /* "(tree fragment)":12
   18173             :  *     return __pyx_result
   18174             :  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
   18175             :  *     __pyx_result.name = __pyx_state[0]             # <<<<<<<<<<<<<<
   18176             :  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
   18177             :  *         __pyx_result.__dict__.update(__pyx_state[1])
   18178             :  */
   18179           0 :   if (unlikely(__pyx_v___pyx_state == Py_None)) {
   18180           0 :     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
   18181           0 :     __PYX_ERR(1, 12, __pyx_L1_error)
   18182             :   }
   18183           0 :   __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
   18184           0 :   __Pyx_GOTREF(__pyx_t_1);
   18185           0 :   __Pyx_GIVEREF(__pyx_t_1);
   18186           0 :   __Pyx_GOTREF(__pyx_v___pyx_result->name);
   18187           0 :   __Pyx_DECREF(__pyx_v___pyx_result->name);
   18188           0 :   __pyx_v___pyx_result->name = __pyx_t_1;
   18189           0 :   __pyx_t_1 = 0;
   18190             : 
   18191             :   /* "(tree fragment)":13
   18192             :  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
   18193             :  *     __pyx_result.name = __pyx_state[0]
   18194             :  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
   18195             :  *         __pyx_result.__dict__.update(__pyx_state[1])
   18196             :  */
   18197           0 :   if (unlikely(__pyx_v___pyx_state == Py_None)) {
   18198             :     PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
   18199             :     __PYX_ERR(1, 13, __pyx_L1_error)
   18200             :   }
   18201           0 :   __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
   18202           0 :   __pyx_t_4 = (__pyx_t_3 > 1);
   18203           0 :   if (__pyx_t_4) {
   18204           0 :   } else {
   18205           0 :     __pyx_t_2 = __pyx_t_4;
   18206           0 :     goto __pyx_L4_bool_binop_done;
   18207             :   }
   18208           0 :   __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
   18209             :   __pyx_t_2 = __pyx_t_4;
   18210           0 :   __pyx_L4_bool_binop_done:;
   18211           0 :   if (__pyx_t_2) {
   18212             : 
   18213             :     /* "(tree fragment)":14
   18214             :  *     __pyx_result.name = __pyx_state[0]
   18215             :  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
   18216             :  *         __pyx_result.__dict__.update(__pyx_state[1])             # <<<<<<<<<<<<<<
   18217             :  */
   18218           0 :     __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error)
   18219           0 :     __Pyx_GOTREF(__pyx_t_5);
   18220           0 :     __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
   18221           0 :     __Pyx_GOTREF(__pyx_t_6);
   18222           0 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   18223           0 :     if (unlikely(__pyx_v___pyx_state == Py_None)) {
   18224             :       PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
   18225             :       __PYX_ERR(1, 14, __pyx_L1_error)
   18226             :     }
   18227           0 :     __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error)
   18228           0 :     __Pyx_GOTREF(__pyx_t_5);
   18229           0 :     __pyx_t_7 = NULL;
   18230           0 :     __pyx_t_8 = 0;
   18231             :     #if CYTHON_UNPACK_METHODS
   18232           0 :     if (likely(PyMethod_Check(__pyx_t_6))) {
   18233           0 :       __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
   18234           0 :       if (likely(__pyx_t_7)) {
   18235           0 :         PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
   18236           0 :         __Pyx_INCREF(__pyx_t_7);
   18237           0 :         __Pyx_INCREF(function);
   18238           0 :         __Pyx_DECREF_SET(__pyx_t_6, function);
   18239             :         __pyx_t_8 = 1;
   18240             :       }
   18241             :     }
   18242             :     #endif
   18243             :     {
   18244           0 :       PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
   18245           0 :       __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
   18246           0 :       __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
   18247           0 :       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   18248           0 :       if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
   18249           0 :       __Pyx_GOTREF(__pyx_t_1);
   18250           0 :       __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
   18251             :     }
   18252           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   18253             : 
   18254             :     /* "(tree fragment)":13
   18255             :  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
   18256             :  *     __pyx_result.name = __pyx_state[0]
   18257             :  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
   18258             :  *         __pyx_result.__dict__.update(__pyx_state[1])
   18259             :  */
   18260             :   }
   18261             : 
   18262             :   /* "(tree fragment)":11
   18263             :  *         __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
   18264             :  *     return __pyx_result
   18265             :  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
   18266             :  *     __pyx_result.name = __pyx_state[0]
   18267             :  *     if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
   18268             :  */
   18269             : 
   18270             :   /* function exit code */
   18271           0 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   18272           0 :   goto __pyx_L0;
   18273           0 :   __pyx_L1_error:;
   18274           0 :   __Pyx_XDECREF(__pyx_t_1);
   18275           0 :   __Pyx_XDECREF(__pyx_t_5);
   18276           0 :   __Pyx_XDECREF(__pyx_t_6);
   18277           0 :   __Pyx_XDECREF(__pyx_t_7);
   18278           0 :   __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
   18279           0 :   __pyx_r = 0;
   18280           0 :   __pyx_L0:;
   18281           0 :   __Pyx_XGIVEREF(__pyx_r);
   18282           0 :   __Pyx_RefNannyFinishContext();
   18283           0 :   return __pyx_r;
   18284             : }
   18285             : 
   18286             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":286
   18287             :  * 
   18288             :  *         @property
   18289             :  *         cdef inline npy_intp itemsize(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18290             :  *             return PyDataType_ELSIZE(self)
   18291             :  * 
   18292             :  */
   18293             : 
   18294             : static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_8itemsize_itemsize(PyArray_Descr *__pyx_v_self) {
   18295             :   npy_intp __pyx_r;
   18296             : 
   18297             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":287
   18298             :  *         @property
   18299             :  *         cdef inline npy_intp itemsize(self) noexcept nogil:
   18300             :  *             return PyDataType_ELSIZE(self)             # <<<<<<<<<<<<<<
   18301             :  * 
   18302             :  *         @property
   18303             :  */
   18304             :   __pyx_r = PyDataType_ELSIZE(__pyx_v_self);
   18305             :   goto __pyx_L0;
   18306             : 
   18307             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":286
   18308             :  * 
   18309             :  *         @property
   18310             :  *         cdef inline npy_intp itemsize(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18311             :  *             return PyDataType_ELSIZE(self)
   18312             :  * 
   18313             :  */
   18314             : 
   18315             :   /* function exit code */
   18316             :   __pyx_L0:;
   18317             :   return __pyx_r;
   18318             : }
   18319             : 
   18320             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":290
   18321             :  * 
   18322             :  *         @property
   18323             :  *         cdef inline npy_intp alignment(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18324             :  *             return PyDataType_ALIGNMENT(self)
   18325             :  * 
   18326             :  */
   18327             : 
   18328             : static CYTHON_INLINE npy_intp __pyx_f_5numpy_5dtype_9alignment_alignment(PyArray_Descr *__pyx_v_self) {
   18329             :   npy_intp __pyx_r;
   18330             : 
   18331             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":291
   18332             :  *         @property
   18333             :  *         cdef inline npy_intp alignment(self) noexcept nogil:
   18334             :  *             return PyDataType_ALIGNMENT(self)             # <<<<<<<<<<<<<<
   18335             :  * 
   18336             :  *         # Use fields/names with care as they may be NULL.  You must check
   18337             :  */
   18338             :   __pyx_r = PyDataType_ALIGNMENT(__pyx_v_self);
   18339             :   goto __pyx_L0;
   18340             : 
   18341             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":290
   18342             :  * 
   18343             :  *         @property
   18344             :  *         cdef inline npy_intp alignment(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18345             :  *             return PyDataType_ALIGNMENT(self)
   18346             :  * 
   18347             :  */
   18348             : 
   18349             :   /* function exit code */
   18350             :   __pyx_L0:;
   18351             :   return __pyx_r;
   18352             : }
   18353             : 
   18354             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":296
   18355             :  *         # for this using PyDataType_HASFIELDS.
   18356             :  *         @property
   18357             :  *         cdef inline object fields(self):             # <<<<<<<<<<<<<<
   18358             :  *             return <object>PyDataType_FIELDS(self)
   18359             :  * 
   18360             :  */
   18361             : 
   18362             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_6fields_fields(PyArray_Descr *__pyx_v_self) {
   18363             :   PyObject *__pyx_r = NULL;
   18364             :   __Pyx_RefNannyDeclarations
   18365             :   PyObject *__pyx_t_1;
   18366             :   __Pyx_RefNannySetupContext("fields", 1);
   18367             : 
   18368             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":297
   18369             :  *         @property
   18370             :  *         cdef inline object fields(self):
   18371             :  *             return <object>PyDataType_FIELDS(self)             # <<<<<<<<<<<<<<
   18372             :  * 
   18373             :  *         @property
   18374             :  */
   18375             :   __Pyx_XDECREF(__pyx_r);
   18376             :   __pyx_t_1 = PyDataType_FIELDS(__pyx_v_self);
   18377             :   __Pyx_INCREF(((PyObject *)__pyx_t_1));
   18378             :   __pyx_r = ((PyObject *)__pyx_t_1);
   18379             :   goto __pyx_L0;
   18380             : 
   18381             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":296
   18382             :  *         # for this using PyDataType_HASFIELDS.
   18383             :  *         @property
   18384             :  *         cdef inline object fields(self):             # <<<<<<<<<<<<<<
   18385             :  *             return <object>PyDataType_FIELDS(self)
   18386             :  * 
   18387             :  */
   18388             : 
   18389             :   /* function exit code */
   18390             :   __pyx_L0:;
   18391             :   __Pyx_XGIVEREF(__pyx_r);
   18392             :   __Pyx_RefNannyFinishContext();
   18393             :   return __pyx_r;
   18394             : }
   18395             : 
   18396             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":300
   18397             :  * 
   18398             :  *         @property
   18399             :  *         cdef inline tuple names(self):             # <<<<<<<<<<<<<<
   18400             :  *             return <tuple>PyDataType_NAMES(self)
   18401             :  * 
   18402             :  */
   18403             : 
   18404             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_5dtype_5names_names(PyArray_Descr *__pyx_v_self) {
   18405             :   PyObject *__pyx_r = NULL;
   18406             :   __Pyx_RefNannyDeclarations
   18407             :   PyObject *__pyx_t_1;
   18408             :   __Pyx_RefNannySetupContext("names", 1);
   18409             : 
   18410             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":301
   18411             :  *         @property
   18412             :  *         cdef inline tuple names(self):
   18413             :  *             return <tuple>PyDataType_NAMES(self)             # <<<<<<<<<<<<<<
   18414             :  * 
   18415             :  *         # Use PyDataType_HASSUBARRAY to test whether this field is
   18416             :  */
   18417             :   __Pyx_XDECREF(__pyx_r);
   18418             :   __pyx_t_1 = PyDataType_NAMES(__pyx_v_self);
   18419             :   __Pyx_INCREF(((PyObject*)__pyx_t_1));
   18420             :   __pyx_r = ((PyObject*)__pyx_t_1);
   18421             :   goto __pyx_L0;
   18422             : 
   18423             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":300
   18424             :  * 
   18425             :  *         @property
   18426             :  *         cdef inline tuple names(self):             # <<<<<<<<<<<<<<
   18427             :  *             return <tuple>PyDataType_NAMES(self)
   18428             :  * 
   18429             :  */
   18430             : 
   18431             :   /* function exit code */
   18432             :   __pyx_L0:;
   18433             :   __Pyx_XGIVEREF(__pyx_r);
   18434             :   __Pyx_RefNannyFinishContext();
   18435             :   return __pyx_r;
   18436             : }
   18437             : 
   18438             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":307
   18439             :  *         # this field via the inline helper method PyDataType_SHAPE.
   18440             :  *         @property
   18441             :  *         cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18442             :  *             return PyDataType_SUBARRAY(self)
   18443             :  * 
   18444             :  */
   18445             : 
   18446             : static CYTHON_INLINE PyArray_ArrayDescr *__pyx_f_5numpy_5dtype_8subarray_subarray(PyArray_Descr *__pyx_v_self) {
   18447             :   PyArray_ArrayDescr *__pyx_r;
   18448             : 
   18449             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":308
   18450             :  *         @property
   18451             :  *         cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil:
   18452             :  *             return PyDataType_SUBARRAY(self)             # <<<<<<<<<<<<<<
   18453             :  * 
   18454             :  *         @property
   18455             :  */
   18456             :   __pyx_r = PyDataType_SUBARRAY(__pyx_v_self);
   18457             :   goto __pyx_L0;
   18458             : 
   18459             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":307
   18460             :  *         # this field via the inline helper method PyDataType_SHAPE.
   18461             :  *         @property
   18462             :  *         cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18463             :  *             return PyDataType_SUBARRAY(self)
   18464             :  * 
   18465             :  */
   18466             : 
   18467             :   /* function exit code */
   18468             :   __pyx_L0:;
   18469             :   return __pyx_r;
   18470             : }
   18471             : 
   18472             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":311
   18473             :  * 
   18474             :  *         @property
   18475             :  *         cdef inline npy_uint64 flags(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18476             :  *             """The data types flags."""
   18477             :  *             return PyDataType_FLAGS(self)
   18478             :  */
   18479             : 
   18480             : static CYTHON_INLINE npy_uint64 __pyx_f_5numpy_5dtype_5flags_flags(PyArray_Descr *__pyx_v_self) {
   18481             :   npy_uint64 __pyx_r;
   18482             : 
   18483             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":313
   18484             :  *         cdef inline npy_uint64 flags(self) noexcept nogil:
   18485             :  *             """The data types flags."""
   18486             :  *             return PyDataType_FLAGS(self)             # <<<<<<<<<<<<<<
   18487             :  * 
   18488             :  * 
   18489             :  */
   18490             :   __pyx_r = PyDataType_FLAGS(__pyx_v_self);
   18491             :   goto __pyx_L0;
   18492             : 
   18493             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":311
   18494             :  * 
   18495             :  *         @property
   18496             :  *         cdef inline npy_uint64 flags(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18497             :  *             """The data types flags."""
   18498             :  *             return PyDataType_FLAGS(self)
   18499             :  */
   18500             : 
   18501             :   /* function exit code */
   18502             :   __pyx_L0:;
   18503             :   return __pyx_r;
   18504             : }
   18505             : 
   18506             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":323
   18507             :  * 
   18508             :  *         @property
   18509             :  *         cdef inline int numiter(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18510             :  *             """The number of arrays that need to be broadcast to the same shape."""
   18511             :  *             return PyArray_MultiIter_NUMITER(self)
   18512             :  */
   18513             : 
   18514             : static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_7numiter_numiter(PyArrayMultiIterObject *__pyx_v_self) {
   18515             :   int __pyx_r;
   18516             : 
   18517             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":325
   18518             :  *         cdef inline int numiter(self) noexcept nogil:
   18519             :  *             """The number of arrays that need to be broadcast to the same shape."""
   18520             :  *             return PyArray_MultiIter_NUMITER(self)             # <<<<<<<<<<<<<<
   18521             :  * 
   18522             :  *         @property
   18523             :  */
   18524             :   __pyx_r = PyArray_MultiIter_NUMITER(__pyx_v_self);
   18525             :   goto __pyx_L0;
   18526             : 
   18527             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":323
   18528             :  * 
   18529             :  *         @property
   18530             :  *         cdef inline int numiter(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18531             :  *             """The number of arrays that need to be broadcast to the same shape."""
   18532             :  *             return PyArray_MultiIter_NUMITER(self)
   18533             :  */
   18534             : 
   18535             :   /* function exit code */
   18536             :   __pyx_L0:;
   18537             :   return __pyx_r;
   18538             : }
   18539             : 
   18540             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":328
   18541             :  * 
   18542             :  *         @property
   18543             :  *         cdef inline npy_intp size(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18544             :  *             """The total broadcasted size."""
   18545             :  *             return PyArray_MultiIter_SIZE(self)
   18546             :  */
   18547             : 
   18548             : static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_4size_size(PyArrayMultiIterObject *__pyx_v_self) {
   18549             :   npy_intp __pyx_r;
   18550             : 
   18551             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":330
   18552             :  *         cdef inline npy_intp size(self) noexcept nogil:
   18553             :  *             """The total broadcasted size."""
   18554             :  *             return PyArray_MultiIter_SIZE(self)             # <<<<<<<<<<<<<<
   18555             :  * 
   18556             :  *         @property
   18557             :  */
   18558             :   __pyx_r = PyArray_MultiIter_SIZE(__pyx_v_self);
   18559             :   goto __pyx_L0;
   18560             : 
   18561             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":328
   18562             :  * 
   18563             :  *         @property
   18564             :  *         cdef inline npy_intp size(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18565             :  *             """The total broadcasted size."""
   18566             :  *             return PyArray_MultiIter_SIZE(self)
   18567             :  */
   18568             : 
   18569             :   /* function exit code */
   18570             :   __pyx_L0:;
   18571             :   return __pyx_r;
   18572             : }
   18573             : 
   18574             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":333
   18575             :  * 
   18576             :  *         @property
   18577             :  *         cdef inline npy_intp index(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18578             :  *             """The current (1-d) index into the broadcasted result."""
   18579             :  *             return PyArray_MultiIter_INDEX(self)
   18580             :  */
   18581             : 
   18582             : static CYTHON_INLINE npy_intp __pyx_f_5numpy_9broadcast_5index_index(PyArrayMultiIterObject *__pyx_v_self) {
   18583             :   npy_intp __pyx_r;
   18584             : 
   18585             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":335
   18586             :  *         cdef inline npy_intp index(self) noexcept nogil:
   18587             :  *             """The current (1-d) index into the broadcasted result."""
   18588             :  *             return PyArray_MultiIter_INDEX(self)             # <<<<<<<<<<<<<<
   18589             :  * 
   18590             :  *         @property
   18591             :  */
   18592             :   __pyx_r = PyArray_MultiIter_INDEX(__pyx_v_self);
   18593             :   goto __pyx_L0;
   18594             : 
   18595             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":333
   18596             :  * 
   18597             :  *         @property
   18598             :  *         cdef inline npy_intp index(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18599             :  *             """The current (1-d) index into the broadcasted result."""
   18600             :  *             return PyArray_MultiIter_INDEX(self)
   18601             :  */
   18602             : 
   18603             :   /* function exit code */
   18604             :   __pyx_L0:;
   18605             :   return __pyx_r;
   18606             : }
   18607             : 
   18608             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":338
   18609             :  * 
   18610             :  *         @property
   18611             :  *         cdef inline int nd(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18612             :  *             """The number of dimensions in the broadcasted result."""
   18613             :  *             return PyArray_MultiIter_NDIM(self)
   18614             :  */
   18615             : 
   18616             : static CYTHON_INLINE int __pyx_f_5numpy_9broadcast_2nd_nd(PyArrayMultiIterObject *__pyx_v_self) {
   18617             :   int __pyx_r;
   18618             : 
   18619             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":340
   18620             :  *         cdef inline int nd(self) noexcept nogil:
   18621             :  *             """The number of dimensions in the broadcasted result."""
   18622             :  *             return PyArray_MultiIter_NDIM(self)             # <<<<<<<<<<<<<<
   18623             :  * 
   18624             :  *         @property
   18625             :  */
   18626             :   __pyx_r = PyArray_MultiIter_NDIM(__pyx_v_self);
   18627             :   goto __pyx_L0;
   18628             : 
   18629             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":338
   18630             :  * 
   18631             :  *         @property
   18632             :  *         cdef inline int nd(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18633             :  *             """The number of dimensions in the broadcasted result."""
   18634             :  *             return PyArray_MultiIter_NDIM(self)
   18635             :  */
   18636             : 
   18637             :   /* function exit code */
   18638             :   __pyx_L0:;
   18639             :   return __pyx_r;
   18640             : }
   18641             : 
   18642             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":343
   18643             :  * 
   18644             :  *         @property
   18645             :  *         cdef inline npy_intp* dimensions(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18646             :  *             """The shape of the broadcasted result."""
   18647             :  *             return PyArray_MultiIter_DIMS(self)
   18648             :  */
   18649             : 
   18650             : static CYTHON_INLINE npy_intp *__pyx_f_5numpy_9broadcast_10dimensions_dimensions(PyArrayMultiIterObject *__pyx_v_self) {
   18651             :   npy_intp *__pyx_r;
   18652             : 
   18653             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":345
   18654             :  *         cdef inline npy_intp* dimensions(self) noexcept nogil:
   18655             :  *             """The shape of the broadcasted result."""
   18656             :  *             return PyArray_MultiIter_DIMS(self)             # <<<<<<<<<<<<<<
   18657             :  * 
   18658             :  *         @property
   18659             :  */
   18660             :   __pyx_r = PyArray_MultiIter_DIMS(__pyx_v_self);
   18661             :   goto __pyx_L0;
   18662             : 
   18663             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":343
   18664             :  * 
   18665             :  *         @property
   18666             :  *         cdef inline npy_intp* dimensions(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18667             :  *             """The shape of the broadcasted result."""
   18668             :  *             return PyArray_MultiIter_DIMS(self)
   18669             :  */
   18670             : 
   18671             :   /* function exit code */
   18672             :   __pyx_L0:;
   18673             :   return __pyx_r;
   18674             : }
   18675             : 
   18676             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":348
   18677             :  * 
   18678             :  *         @property
   18679             :  *         cdef inline void** iters(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18680             :  *             """An array of iterator objects that holds the iterators for the arrays to be broadcast together.
   18681             :  *             On return, the iterators are adjusted for broadcasting."""
   18682             :  */
   18683             : 
   18684             : static CYTHON_INLINE void **__pyx_f_5numpy_9broadcast_5iters_iters(PyArrayMultiIterObject *__pyx_v_self) {
   18685             :   void **__pyx_r;
   18686             : 
   18687             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":351
   18688             :  *             """An array of iterator objects that holds the iterators for the arrays to be broadcast together.
   18689             :  *             On return, the iterators are adjusted for broadcasting."""
   18690             :  *             return PyArray_MultiIter_ITERS(self)             # <<<<<<<<<<<<<<
   18691             :  * 
   18692             :  * 
   18693             :  */
   18694             :   __pyx_r = PyArray_MultiIter_ITERS(__pyx_v_self);
   18695             :   goto __pyx_L0;
   18696             : 
   18697             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":348
   18698             :  * 
   18699             :  *         @property
   18700             :  *         cdef inline void** iters(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18701             :  *             """An array of iterator objects that holds the iterators for the arrays to be broadcast together.
   18702             :  *             On return, the iterators are adjusted for broadcasting."""
   18703             :  */
   18704             : 
   18705             :   /* function exit code */
   18706             :   __pyx_L0:;
   18707             :   return __pyx_r;
   18708             : }
   18709             : 
   18710             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":366
   18711             :  * 
   18712             :  *         @property
   18713             :  *         cdef inline PyObject* base(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18714             :  *             """Returns a borrowed reference to the object owning the data/memory.
   18715             :  *             """
   18716             :  */
   18717             : 
   18718             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject *__pyx_v_self) {
   18719             :   PyObject *__pyx_r;
   18720             : 
   18721             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":369
   18722             :  *             """Returns a borrowed reference to the object owning the data/memory.
   18723             :  *             """
   18724             :  *             return PyArray_BASE(self)             # <<<<<<<<<<<<<<
   18725             :  * 
   18726             :  *         @property
   18727             :  */
   18728             :   __pyx_r = PyArray_BASE(__pyx_v_self);
   18729             :   goto __pyx_L0;
   18730             : 
   18731             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":366
   18732             :  * 
   18733             :  *         @property
   18734             :  *         cdef inline PyObject* base(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18735             :  *             """Returns a borrowed reference to the object owning the data/memory.
   18736             :  *             """
   18737             :  */
   18738             : 
   18739             :   /* function exit code */
   18740             :   __pyx_L0:;
   18741             :   return __pyx_r;
   18742             : }
   18743             : 
   18744             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":372
   18745             :  * 
   18746             :  *         @property
   18747             :  *         cdef inline dtype descr(self):             # <<<<<<<<<<<<<<
   18748             :  *             """Returns an owned reference to the dtype of the array.
   18749             :  *             """
   18750             :  */
   18751             : 
   18752             : static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArrayObject *__pyx_v_self) {
   18753             :   PyArray_Descr *__pyx_r = NULL;
   18754             :   __Pyx_RefNannyDeclarations
   18755             :   PyArray_Descr *__pyx_t_1;
   18756             :   __Pyx_RefNannySetupContext("descr", 1);
   18757             : 
   18758             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":375
   18759             :  *             """Returns an owned reference to the dtype of the array.
   18760             :  *             """
   18761             :  *             return <dtype>PyArray_DESCR(self)             # <<<<<<<<<<<<<<
   18762             :  * 
   18763             :  *         @property
   18764             :  */
   18765             :   __Pyx_XDECREF((PyObject *)__pyx_r);
   18766             :   __pyx_t_1 = PyArray_DESCR(__pyx_v_self);
   18767             :   __Pyx_INCREF((PyObject *)((PyArray_Descr *)__pyx_t_1));
   18768             :   __pyx_r = ((PyArray_Descr *)__pyx_t_1);
   18769             :   goto __pyx_L0;
   18770             : 
   18771             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":372
   18772             :  * 
   18773             :  *         @property
   18774             :  *         cdef inline dtype descr(self):             # <<<<<<<<<<<<<<
   18775             :  *             """Returns an owned reference to the dtype of the array.
   18776             :  *             """
   18777             :  */
   18778             : 
   18779             :   /* function exit code */
   18780             :   __pyx_L0:;
   18781             :   __Pyx_XGIVEREF((PyObject *)__pyx_r);
   18782             :   __Pyx_RefNannyFinishContext();
   18783             :   return __pyx_r;
   18784             : }
   18785             : 
   18786             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":378
   18787             :  * 
   18788             :  *         @property
   18789             :  *         cdef inline int ndim(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18790             :  *             """Returns the number of dimensions in the array.
   18791             :  *             """
   18792             :  */
   18793             : 
   18794             : static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx_v_self) {
   18795             :   int __pyx_r;
   18796             : 
   18797             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":381
   18798             :  *             """Returns the number of dimensions in the array.
   18799             :  *             """
   18800             :  *             return PyArray_NDIM(self)             # <<<<<<<<<<<<<<
   18801             :  * 
   18802             :  *         @property
   18803             :  */
   18804             :   __pyx_r = PyArray_NDIM(__pyx_v_self);
   18805             :   goto __pyx_L0;
   18806             : 
   18807             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":378
   18808             :  * 
   18809             :  *         @property
   18810             :  *         cdef inline int ndim(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18811             :  *             """Returns the number of dimensions in the array.
   18812             :  *             """
   18813             :  */
   18814             : 
   18815             :   /* function exit code */
   18816             :   __pyx_L0:;
   18817             :   return __pyx_r;
   18818             : }
   18819             : 
   18820             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":384
   18821             :  * 
   18822             :  *         @property
   18823             :  *         cdef inline npy_intp *shape(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18824             :  *             """Returns a pointer to the dimensions/shape of the array.
   18825             :  *             The number of elements matches the number of dimensions of the array (ndim).
   18826             :  */
   18827             : 
   18828         141 : static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObject *__pyx_v_self) {
   18829         141 :   npy_intp *__pyx_r;
   18830             : 
   18831             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":389
   18832             :  *             Can return NULL for 0-dimensional arrays.
   18833             :  *             """
   18834             :  *             return PyArray_DIMS(self)             # <<<<<<<<<<<<<<
   18835             :  * 
   18836             :  *         @property
   18837             :  */
   18838         141 :   __pyx_r = PyArray_DIMS(__pyx_v_self);
   18839         141 :   goto __pyx_L0;
   18840             : 
   18841             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":384
   18842             :  * 
   18843             :  *         @property
   18844             :  *         cdef inline npy_intp *shape(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18845             :  *             """Returns a pointer to the dimensions/shape of the array.
   18846             :  *             The number of elements matches the number of dimensions of the array (ndim).
   18847             :  */
   18848             : 
   18849             :   /* function exit code */
   18850         141 :   __pyx_L0:;
   18851         141 :   return __pyx_r;
   18852             : }
   18853             : 
   18854             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":392
   18855             :  * 
   18856             :  *         @property
   18857             :  *         cdef inline npy_intp *strides(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18858             :  *             """Returns a pointer to the strides of the array.
   18859             :  *             The number of elements matches the number of dimensions of the array (ndim).
   18860             :  */
   18861             : 
   18862             : static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayObject *__pyx_v_self) {
   18863             :   npy_intp *__pyx_r;
   18864             : 
   18865             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":396
   18866             :  *             The number of elements matches the number of dimensions of the array (ndim).
   18867             :  *             """
   18868             :  *             return PyArray_STRIDES(self)             # <<<<<<<<<<<<<<
   18869             :  * 
   18870             :  *         @property
   18871             :  */
   18872             :   __pyx_r = PyArray_STRIDES(__pyx_v_self);
   18873             :   goto __pyx_L0;
   18874             : 
   18875             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":392
   18876             :  * 
   18877             :  *         @property
   18878             :  *         cdef inline npy_intp *strides(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18879             :  *             """Returns a pointer to the strides of the array.
   18880             :  *             The number of elements matches the number of dimensions of the array (ndim).
   18881             :  */
   18882             : 
   18883             :   /* function exit code */
   18884             :   __pyx_L0:;
   18885             :   return __pyx_r;
   18886             : }
   18887             : 
   18888             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":399
   18889             :  * 
   18890             :  *         @property
   18891             :  *         cdef inline npy_intp size(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18892             :  *             """Returns the total size (in number of elements) of the array.
   18893             :  *             """
   18894             :  */
   18895             : 
   18896             : static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject *__pyx_v_self) {
   18897             :   npy_intp __pyx_r;
   18898             : 
   18899             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":402
   18900             :  *             """Returns the total size (in number of elements) of the array.
   18901             :  *             """
   18902             :  *             return PyArray_SIZE(self)             # <<<<<<<<<<<<<<
   18903             :  * 
   18904             :  *         @property
   18905             :  */
   18906             :   __pyx_r = PyArray_SIZE(__pyx_v_self);
   18907             :   goto __pyx_L0;
   18908             : 
   18909             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":399
   18910             :  * 
   18911             :  *         @property
   18912             :  *         cdef inline npy_intp size(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18913             :  *             """Returns the total size (in number of elements) of the array.
   18914             :  *             """
   18915             :  */
   18916             : 
   18917             :   /* function exit code */
   18918             :   __pyx_L0:;
   18919             :   return __pyx_r;
   18920             : }
   18921             : 
   18922             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":405
   18923             :  * 
   18924             :  *         @property
   18925             :  *         cdef inline char* data(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18926             :  *             """The pointer to the data buffer as a char*.
   18927             :  *             This is provided for legacy reasons to avoid direct struct field access.
   18928             :  */
   18929             : 
   18930             : static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__pyx_v_self) {
   18931             :   char *__pyx_r;
   18932             : 
   18933             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":411
   18934             :  *             of `PyArray_DATA()` instead, which returns a 'void*'.
   18935             :  *             """
   18936             :  *             return PyArray_BYTES(self)             # <<<<<<<<<<<<<<
   18937             :  * 
   18938             :  * 
   18939             :  */
   18940             :   __pyx_r = PyArray_BYTES(__pyx_v_self);
   18941             :   goto __pyx_L0;
   18942             : 
   18943             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":405
   18944             :  * 
   18945             :  *         @property
   18946             :  *         cdef inline char* data(self) noexcept nogil:             # <<<<<<<<<<<<<<
   18947             :  *             """The pointer to the data buffer as a char*.
   18948             :  *             This is provided for legacy reasons to avoid direct struct field access.
   18949             :  */
   18950             : 
   18951             :   /* function exit code */
   18952             :   __pyx_L0:;
   18953             :   return __pyx_r;
   18954             : }
   18955             : 
   18956             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":806
   18957             :  * ctypedef long double complex clongdouble_t
   18958             :  * 
   18959             :  * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
   18960             :  *     return PyArray_MultiIterNew(1, <void*>a)
   18961             :  * 
   18962             :  */
   18963             : 
   18964             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
   18965             :   PyObject *__pyx_r = NULL;
   18966             :   __Pyx_RefNannyDeclarations
   18967             :   PyObject *__pyx_t_1 = NULL;
   18968             :   int __pyx_lineno = 0;
   18969             :   const char *__pyx_filename = NULL;
   18970             :   int __pyx_clineno = 0;
   18971             :   __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 1);
   18972             : 
   18973             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":807
   18974             :  * 
   18975             :  * cdef inline object PyArray_MultiIterNew1(a):
   18976             :  *     return PyArray_MultiIterNew(1, <void*>a)             # <<<<<<<<<<<<<<
   18977             :  * 
   18978             :  * cdef inline object PyArray_MultiIterNew2(a, b):
   18979             :  */
   18980             :   __Pyx_XDECREF(__pyx_r);
   18981             :   __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 807, __pyx_L1_error)
   18982             :   __Pyx_GOTREF(__pyx_t_1);
   18983             :   __pyx_r = __pyx_t_1;
   18984             :   __pyx_t_1 = 0;
   18985             :   goto __pyx_L0;
   18986             : 
   18987             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":806
   18988             :  * ctypedef long double complex clongdouble_t
   18989             :  * 
   18990             :  * cdef inline object PyArray_MultiIterNew1(a):             # <<<<<<<<<<<<<<
   18991             :  *     return PyArray_MultiIterNew(1, <void*>a)
   18992             :  * 
   18993             :  */
   18994             : 
   18995             :   /* function exit code */
   18996             :   __pyx_L1_error:;
   18997             :   __Pyx_XDECREF(__pyx_t_1);
   18998             :   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
   18999             :   __pyx_r = 0;
   19000             :   __pyx_L0:;
   19001             :   __Pyx_XGIVEREF(__pyx_r);
   19002             :   __Pyx_RefNannyFinishContext();
   19003             :   return __pyx_r;
   19004             : }
   19005             : 
   19006             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":809
   19007             :  *     return PyArray_MultiIterNew(1, <void*>a)
   19008             :  * 
   19009             :  * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
   19010             :  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
   19011             :  * 
   19012             :  */
   19013             : 
   19014             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
   19015             :   PyObject *__pyx_r = NULL;
   19016             :   __Pyx_RefNannyDeclarations
   19017             :   PyObject *__pyx_t_1 = NULL;
   19018             :   int __pyx_lineno = 0;
   19019             :   const char *__pyx_filename = NULL;
   19020             :   int __pyx_clineno = 0;
   19021             :   __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 1);
   19022             : 
   19023             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":810
   19024             :  * 
   19025             :  * cdef inline object PyArray_MultiIterNew2(a, b):
   19026             :  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)             # <<<<<<<<<<<<<<
   19027             :  * 
   19028             :  * cdef inline object PyArray_MultiIterNew3(a, b, c):
   19029             :  */
   19030             :   __Pyx_XDECREF(__pyx_r);
   19031             :   __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 810, __pyx_L1_error)
   19032             :   __Pyx_GOTREF(__pyx_t_1);
   19033             :   __pyx_r = __pyx_t_1;
   19034             :   __pyx_t_1 = 0;
   19035             :   goto __pyx_L0;
   19036             : 
   19037             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":809
   19038             :  *     return PyArray_MultiIterNew(1, <void*>a)
   19039             :  * 
   19040             :  * cdef inline object PyArray_MultiIterNew2(a, b):             # <<<<<<<<<<<<<<
   19041             :  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
   19042             :  * 
   19043             :  */
   19044             : 
   19045             :   /* function exit code */
   19046             :   __pyx_L1_error:;
   19047             :   __Pyx_XDECREF(__pyx_t_1);
   19048             :   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19049             :   __pyx_r = 0;
   19050             :   __pyx_L0:;
   19051             :   __Pyx_XGIVEREF(__pyx_r);
   19052             :   __Pyx_RefNannyFinishContext();
   19053             :   return __pyx_r;
   19054             : }
   19055             : 
   19056             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":812
   19057             :  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
   19058             :  * 
   19059             :  * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
   19060             :  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
   19061             :  * 
   19062             :  */
   19063             : 
   19064             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
   19065             :   PyObject *__pyx_r = NULL;
   19066             :   __Pyx_RefNannyDeclarations
   19067             :   PyObject *__pyx_t_1 = NULL;
   19068             :   int __pyx_lineno = 0;
   19069             :   const char *__pyx_filename = NULL;
   19070             :   int __pyx_clineno = 0;
   19071             :   __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 1);
   19072             : 
   19073             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":813
   19074             :  * 
   19075             :  * cdef inline object PyArray_MultiIterNew3(a, b, c):
   19076             :  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)             # <<<<<<<<<<<<<<
   19077             :  * 
   19078             :  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
   19079             :  */
   19080             :   __Pyx_XDECREF(__pyx_r);
   19081             :   __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 813, __pyx_L1_error)
   19082             :   __Pyx_GOTREF(__pyx_t_1);
   19083             :   __pyx_r = __pyx_t_1;
   19084             :   __pyx_t_1 = 0;
   19085             :   goto __pyx_L0;
   19086             : 
   19087             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":812
   19088             :  *     return PyArray_MultiIterNew(2, <void*>a, <void*>b)
   19089             :  * 
   19090             :  * cdef inline object PyArray_MultiIterNew3(a, b, c):             # <<<<<<<<<<<<<<
   19091             :  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
   19092             :  * 
   19093             :  */
   19094             : 
   19095             :   /* function exit code */
   19096             :   __pyx_L1_error:;
   19097             :   __Pyx_XDECREF(__pyx_t_1);
   19098             :   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19099             :   __pyx_r = 0;
   19100             :   __pyx_L0:;
   19101             :   __Pyx_XGIVEREF(__pyx_r);
   19102             :   __Pyx_RefNannyFinishContext();
   19103             :   return __pyx_r;
   19104             : }
   19105             : 
   19106             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":815
   19107             :  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
   19108             :  * 
   19109             :  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
   19110             :  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
   19111             :  * 
   19112             :  */
   19113             : 
   19114             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
   19115             :   PyObject *__pyx_r = NULL;
   19116             :   __Pyx_RefNannyDeclarations
   19117             :   PyObject *__pyx_t_1 = NULL;
   19118             :   int __pyx_lineno = 0;
   19119             :   const char *__pyx_filename = NULL;
   19120             :   int __pyx_clineno = 0;
   19121             :   __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 1);
   19122             : 
   19123             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":816
   19124             :  * 
   19125             :  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
   19126             :  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)             # <<<<<<<<<<<<<<
   19127             :  * 
   19128             :  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
   19129             :  */
   19130             :   __Pyx_XDECREF(__pyx_r);
   19131             :   __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 816, __pyx_L1_error)
   19132             :   __Pyx_GOTREF(__pyx_t_1);
   19133             :   __pyx_r = __pyx_t_1;
   19134             :   __pyx_t_1 = 0;
   19135             :   goto __pyx_L0;
   19136             : 
   19137             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":815
   19138             :  *     return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
   19139             :  * 
   19140             :  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):             # <<<<<<<<<<<<<<
   19141             :  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
   19142             :  * 
   19143             :  */
   19144             : 
   19145             :   /* function exit code */
   19146             :   __pyx_L1_error:;
   19147             :   __Pyx_XDECREF(__pyx_t_1);
   19148             :   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19149             :   __pyx_r = 0;
   19150             :   __pyx_L0:;
   19151             :   __Pyx_XGIVEREF(__pyx_r);
   19152             :   __Pyx_RefNannyFinishContext();
   19153             :   return __pyx_r;
   19154             : }
   19155             : 
   19156             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":818
   19157             :  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
   19158             :  * 
   19159             :  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
   19160             :  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
   19161             :  * 
   19162             :  */
   19163             : 
   19164             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
   19165             :   PyObject *__pyx_r = NULL;
   19166             :   __Pyx_RefNannyDeclarations
   19167             :   PyObject *__pyx_t_1 = NULL;
   19168             :   int __pyx_lineno = 0;
   19169             :   const char *__pyx_filename = NULL;
   19170             :   int __pyx_clineno = 0;
   19171             :   __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 1);
   19172             : 
   19173             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":819
   19174             :  * 
   19175             :  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
   19176             :  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)             # <<<<<<<<<<<<<<
   19177             :  * 
   19178             :  * cdef inline tuple PyDataType_SHAPE(dtype d):
   19179             :  */
   19180             :   __Pyx_XDECREF(__pyx_r);
   19181             :   __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 819, __pyx_L1_error)
   19182             :   __Pyx_GOTREF(__pyx_t_1);
   19183             :   __pyx_r = __pyx_t_1;
   19184             :   __pyx_t_1 = 0;
   19185             :   goto __pyx_L0;
   19186             : 
   19187             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":818
   19188             :  *     return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
   19189             :  * 
   19190             :  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):             # <<<<<<<<<<<<<<
   19191             :  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
   19192             :  * 
   19193             :  */
   19194             : 
   19195             :   /* function exit code */
   19196             :   __pyx_L1_error:;
   19197             :   __Pyx_XDECREF(__pyx_t_1);
   19198             :   __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19199             :   __pyx_r = 0;
   19200             :   __pyx_L0:;
   19201             :   __Pyx_XGIVEREF(__pyx_r);
   19202             :   __Pyx_RefNannyFinishContext();
   19203             :   return __pyx_r;
   19204             : }
   19205             : 
   19206             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":821
   19207             :  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
   19208             :  * 
   19209             :  * cdef inline tuple PyDataType_SHAPE(dtype d):             # <<<<<<<<<<<<<<
   19210             :  *     if PyDataType_HASSUBARRAY(d):
   19211             :  *         return <tuple>d.subarray.shape
   19212             :  */
   19213             : 
   19214             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
   19215             :   PyObject *__pyx_r = NULL;
   19216             :   __Pyx_RefNannyDeclarations
   19217             :   int __pyx_t_1;
   19218             :   PyObject *__pyx_t_2;
   19219             :   __Pyx_RefNannySetupContext("PyDataType_SHAPE", 1);
   19220             : 
   19221             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":822
   19222             :  * 
   19223             :  * cdef inline tuple PyDataType_SHAPE(dtype d):
   19224             :  *     if PyDataType_HASSUBARRAY(d):             # <<<<<<<<<<<<<<
   19225             :  *         return <tuple>d.subarray.shape
   19226             :  *     else:
   19227             :  */
   19228             :   __pyx_t_1 = PyDataType_HASSUBARRAY(__pyx_v_d);
   19229             :   if (__pyx_t_1) {
   19230             : 
   19231             :     /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":823
   19232             :  * cdef inline tuple PyDataType_SHAPE(dtype d):
   19233             :  *     if PyDataType_HASSUBARRAY(d):
   19234             :  *         return <tuple>d.subarray.shape             # <<<<<<<<<<<<<<
   19235             :  *     else:
   19236             :  *         return ()
   19237             :  */
   19238             :     __Pyx_XDECREF(__pyx_r);
   19239             :     __pyx_t_2 = __pyx_f_5numpy_5dtype_8subarray_subarray(__pyx_v_d)->shape;
   19240             :     __Pyx_INCREF(((PyObject*)__pyx_t_2));
   19241             :     __pyx_r = ((PyObject*)__pyx_t_2);
   19242             :     goto __pyx_L0;
   19243             : 
   19244             :     /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":822
   19245             :  * 
   19246             :  * cdef inline tuple PyDataType_SHAPE(dtype d):
   19247             :  *     if PyDataType_HASSUBARRAY(d):             # <<<<<<<<<<<<<<
   19248             :  *         return <tuple>d.subarray.shape
   19249             :  *     else:
   19250             :  */
   19251             :   }
   19252             : 
   19253             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":825
   19254             :  *         return <tuple>d.subarray.shape
   19255             :  *     else:
   19256             :  *         return ()             # <<<<<<<<<<<<<<
   19257             :  * 
   19258             :  * 
   19259             :  */
   19260             :   /*else*/ {
   19261             :     __Pyx_XDECREF(__pyx_r);
   19262             :     __Pyx_INCREF(__pyx_empty_tuple);
   19263             :     __pyx_r = __pyx_empty_tuple;
   19264             :     goto __pyx_L0;
   19265             :   }
   19266             : 
   19267             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":821
   19268             :  *     return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
   19269             :  * 
   19270             :  * cdef inline tuple PyDataType_SHAPE(dtype d):             # <<<<<<<<<<<<<<
   19271             :  *     if PyDataType_HASSUBARRAY(d):
   19272             :  *         return <tuple>d.subarray.shape
   19273             :  */
   19274             : 
   19275             :   /* function exit code */
   19276             :   __pyx_L0:;
   19277             :   __Pyx_XGIVEREF(__pyx_r);
   19278             :   __Pyx_RefNannyFinishContext();
   19279             :   return __pyx_r;
   19280             : }
   19281             : 
   19282             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1009
   19283             :  *     int _import_umath() except -1
   19284             :  * 
   19285             :  * cdef inline void set_array_base(ndarray arr, object base) except *:             # <<<<<<<<<<<<<<
   19286             :  *     Py_INCREF(base) # important to do this before stealing the reference below!
   19287             :  *     PyArray_SetBaseObject(arr, base)
   19288             :  */
   19289             : 
   19290             : static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
   19291             :   int __pyx_t_1;
   19292             :   int __pyx_lineno = 0;
   19293             :   const char *__pyx_filename = NULL;
   19294             :   int __pyx_clineno = 0;
   19295             : 
   19296             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1010
   19297             :  * 
   19298             :  * cdef inline void set_array_base(ndarray arr, object base) except *:
   19299             :  *     Py_INCREF(base) # important to do this before stealing the reference below!             # <<<<<<<<<<<<<<
   19300             :  *     PyArray_SetBaseObject(arr, base)
   19301             :  * 
   19302             :  */
   19303             :   Py_INCREF(__pyx_v_base);
   19304             : 
   19305             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1011
   19306             :  * cdef inline void set_array_base(ndarray arr, object base) except *:
   19307             :  *     Py_INCREF(base) # important to do this before stealing the reference below!
   19308             :  *     PyArray_SetBaseObject(arr, base)             # <<<<<<<<<<<<<<
   19309             :  * 
   19310             :  * cdef inline object get_array_base(ndarray arr):
   19311             :  */
   19312             :   __pyx_t_1 = PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 1011, __pyx_L1_error)
   19313             : 
   19314             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1009
   19315             :  *     int _import_umath() except -1
   19316             :  * 
   19317             :  * cdef inline void set_array_base(ndarray arr, object base) except *:             # <<<<<<<<<<<<<<
   19318             :  *     Py_INCREF(base) # important to do this before stealing the reference below!
   19319             :  *     PyArray_SetBaseObject(arr, base)
   19320             :  */
   19321             : 
   19322             :   /* function exit code */
   19323             :   goto __pyx_L0;
   19324             :   __pyx_L1_error:;
   19325             :   __Pyx_AddTraceback("numpy.set_array_base", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19326             :   __pyx_L0:;
   19327             : }
   19328             : 
   19329             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1013
   19330             :  *     PyArray_SetBaseObject(arr, base)
   19331             :  * 
   19332             :  * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
   19333             :  *     base = PyArray_BASE(arr)
   19334             :  *     if base is NULL:
   19335             :  */
   19336             : 
   19337             : static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
   19338             :   PyObject *__pyx_v_base;
   19339             :   PyObject *__pyx_r = NULL;
   19340             :   __Pyx_RefNannyDeclarations
   19341             :   int __pyx_t_1;
   19342             :   __Pyx_RefNannySetupContext("get_array_base", 1);
   19343             : 
   19344             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1014
   19345             :  * 
   19346             :  * cdef inline object get_array_base(ndarray arr):
   19347             :  *     base = PyArray_BASE(arr)             # <<<<<<<<<<<<<<
   19348             :  *     if base is NULL:
   19349             :  *         return None
   19350             :  */
   19351             :   __pyx_v_base = PyArray_BASE(__pyx_v_arr);
   19352             : 
   19353             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1015
   19354             :  * cdef inline object get_array_base(ndarray arr):
   19355             :  *     base = PyArray_BASE(arr)
   19356             :  *     if base is NULL:             # <<<<<<<<<<<<<<
   19357             :  *         return None
   19358             :  *     return <object>base
   19359             :  */
   19360             :   __pyx_t_1 = (__pyx_v_base == NULL);
   19361             :   if (__pyx_t_1) {
   19362             : 
   19363             :     /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1016
   19364             :  *     base = PyArray_BASE(arr)
   19365             :  *     if base is NULL:
   19366             :  *         return None             # <<<<<<<<<<<<<<
   19367             :  *     return <object>base
   19368             :  * 
   19369             :  */
   19370             :     __Pyx_XDECREF(__pyx_r);
   19371             :     __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   19372             :     goto __pyx_L0;
   19373             : 
   19374             :     /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1015
   19375             :  * cdef inline object get_array_base(ndarray arr):
   19376             :  *     base = PyArray_BASE(arr)
   19377             :  *     if base is NULL:             # <<<<<<<<<<<<<<
   19378             :  *         return None
   19379             :  *     return <object>base
   19380             :  */
   19381             :   }
   19382             : 
   19383             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1017
   19384             :  *     if base is NULL:
   19385             :  *         return None
   19386             :  *     return <object>base             # <<<<<<<<<<<<<<
   19387             :  * 
   19388             :  * # Versions of the import_* functions which are more suitable for
   19389             :  */
   19390             :   __Pyx_XDECREF(__pyx_r);
   19391             :   __Pyx_INCREF(((PyObject *)__pyx_v_base));
   19392             :   __pyx_r = ((PyObject *)__pyx_v_base);
   19393             :   goto __pyx_L0;
   19394             : 
   19395             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1013
   19396             :  *     PyArray_SetBaseObject(arr, base)
   19397             :  * 
   19398             :  * cdef inline object get_array_base(ndarray arr):             # <<<<<<<<<<<<<<
   19399             :  *     base = PyArray_BASE(arr)
   19400             :  *     if base is NULL:
   19401             :  */
   19402             : 
   19403             :   /* function exit code */
   19404             :   __pyx_L0:;
   19405             :   __Pyx_XGIVEREF(__pyx_r);
   19406             :   __Pyx_RefNannyFinishContext();
   19407             :   return __pyx_r;
   19408             : }
   19409             : 
   19410             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1021
   19411             :  * # Versions of the import_* functions which are more suitable for
   19412             :  * # Cython code.
   19413             :  * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
   19414             :  *     try:
   19415             :  *         __pyx_import_array()
   19416             :  */
   19417             : 
   19418           1 : static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
   19419           1 :   int __pyx_r;
   19420             :   __Pyx_RefNannyDeclarations
   19421           1 :   PyObject *__pyx_t_1 = NULL;
   19422           1 :   PyObject *__pyx_t_2 = NULL;
   19423           1 :   PyObject *__pyx_t_3 = NULL;
   19424           1 :   int __pyx_t_4;
   19425           1 :   PyObject *__pyx_t_5 = NULL;
   19426           1 :   PyObject *__pyx_t_6 = NULL;
   19427           1 :   PyObject *__pyx_t_7 = NULL;
   19428           1 :   PyObject *__pyx_t_8 = NULL;
   19429           1 :   int __pyx_lineno = 0;
   19430           1 :   const char *__pyx_filename = NULL;
   19431           1 :   int __pyx_clineno = 0;
   19432           1 :   __Pyx_RefNannySetupContext("import_array", 1);
   19433             : 
   19434             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1022
   19435             :  * # Cython code.
   19436             :  * cdef inline int import_array() except -1:
   19437             :  *     try:             # <<<<<<<<<<<<<<
   19438             :  *         __pyx_import_array()
   19439             :  *     except Exception:
   19440             :  */
   19441             :   {
   19442           1 :     __Pyx_PyThreadState_declare
   19443           1 :     __Pyx_PyThreadState_assign
   19444           1 :     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
   19445           1 :     __Pyx_XGOTREF(__pyx_t_1);
   19446           1 :     __Pyx_XGOTREF(__pyx_t_2);
   19447           1 :     __Pyx_XGOTREF(__pyx_t_3);
   19448             :     /*try:*/ {
   19449             : 
   19450             :       /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1023
   19451             :  * cdef inline int import_array() except -1:
   19452             :  *     try:
   19453             :  *         __pyx_import_array()             # <<<<<<<<<<<<<<
   19454             :  *     except Exception:
   19455             :  *         raise ImportError("numpy._core.multiarray failed to import")
   19456             :  */
   19457           1 :       __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1023, __pyx_L3_error)
   19458             : 
   19459             :       /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1022
   19460             :  * # Cython code.
   19461             :  * cdef inline int import_array() except -1:
   19462             :  *     try:             # <<<<<<<<<<<<<<
   19463             :  *         __pyx_import_array()
   19464             :  *     except Exception:
   19465             :  */
   19466             :     }
   19467           1 :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   19468           1 :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   19469           1 :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   19470           1 :     goto __pyx_L8_try_end;
   19471           0 :     __pyx_L3_error:;
   19472             : 
   19473             :     /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1024
   19474             :  *     try:
   19475             :  *         __pyx_import_array()
   19476             :  *     except Exception:             # <<<<<<<<<<<<<<
   19477             :  *         raise ImportError("numpy._core.multiarray failed to import")
   19478             :  * 
   19479             :  */
   19480           0 :     __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
   19481           0 :     if (__pyx_t_4) {
   19482           0 :       __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19483           0 :       if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1024, __pyx_L5_except_error)
   19484           0 :       __Pyx_XGOTREF(__pyx_t_5);
   19485           0 :       __Pyx_XGOTREF(__pyx_t_6);
   19486           0 :       __Pyx_XGOTREF(__pyx_t_7);
   19487             : 
   19488             :       /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1025
   19489             :  *         __pyx_import_array()
   19490             :  *     except Exception:
   19491             :  *         raise ImportError("numpy._core.multiarray failed to import")             # <<<<<<<<<<<<<<
   19492             :  * 
   19493             :  * cdef inline int import_umath() except -1:
   19494             :  */
   19495           0 :       __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1025, __pyx_L5_except_error)
   19496           0 :       __Pyx_GOTREF(__pyx_t_8);
   19497           0 :       __Pyx_Raise(__pyx_t_8, 0, 0, 0);
   19498           0 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   19499           0 :       __PYX_ERR(2, 1025, __pyx_L5_except_error)
   19500             :     }
   19501           0 :     goto __pyx_L5_except_error;
   19502             : 
   19503             :     /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1022
   19504             :  * # Cython code.
   19505             :  * cdef inline int import_array() except -1:
   19506             :  *     try:             # <<<<<<<<<<<<<<
   19507             :  *         __pyx_import_array()
   19508             :  *     except Exception:
   19509             :  */
   19510           0 :     __pyx_L5_except_error:;
   19511           0 :     __Pyx_XGIVEREF(__pyx_t_1);
   19512           0 :     __Pyx_XGIVEREF(__pyx_t_2);
   19513           0 :     __Pyx_XGIVEREF(__pyx_t_3);
   19514           0 :     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
   19515           0 :     goto __pyx_L1_error;
   19516           1 :     __pyx_L8_try_end:;
   19517             :   }
   19518             : 
   19519             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1021
   19520             :  * # Versions of the import_* functions which are more suitable for
   19521             :  * # Cython code.
   19522             :  * cdef inline int import_array() except -1:             # <<<<<<<<<<<<<<
   19523             :  *     try:
   19524             :  *         __pyx_import_array()
   19525             :  */
   19526             : 
   19527             :   /* function exit code */
   19528           1 :   __pyx_r = 0;
   19529           1 :   goto __pyx_L0;
   19530           0 :   __pyx_L1_error:;
   19531           0 :   __Pyx_XDECREF(__pyx_t_5);
   19532           0 :   __Pyx_XDECREF(__pyx_t_6);
   19533           0 :   __Pyx_XDECREF(__pyx_t_7);
   19534           0 :   __Pyx_XDECREF(__pyx_t_8);
   19535           0 :   __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19536           0 :   __pyx_r = -1;
   19537           1 :   __pyx_L0:;
   19538           1 :   __Pyx_RefNannyFinishContext();
   19539           1 :   return __pyx_r;
   19540             : }
   19541             : 
   19542             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1027
   19543             :  *         raise ImportError("numpy._core.multiarray failed to import")
   19544             :  * 
   19545             :  * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<
   19546             :  *     try:
   19547             :  *         _import_umath()
   19548             :  */
   19549             : 
   19550             : static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
   19551             :   int __pyx_r;
   19552             :   __Pyx_RefNannyDeclarations
   19553             :   PyObject *__pyx_t_1 = NULL;
   19554             :   PyObject *__pyx_t_2 = NULL;
   19555             :   PyObject *__pyx_t_3 = NULL;
   19556             :   int __pyx_t_4;
   19557             :   PyObject *__pyx_t_5 = NULL;
   19558             :   PyObject *__pyx_t_6 = NULL;
   19559             :   PyObject *__pyx_t_7 = NULL;
   19560             :   PyObject *__pyx_t_8 = NULL;
   19561             :   int __pyx_lineno = 0;
   19562             :   const char *__pyx_filename = NULL;
   19563             :   int __pyx_clineno = 0;
   19564             :   __Pyx_RefNannySetupContext("import_umath", 1);
   19565             : 
   19566             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1028
   19567             :  * 
   19568             :  * cdef inline int import_umath() except -1:
   19569             :  *     try:             # <<<<<<<<<<<<<<
   19570             :  *         _import_umath()
   19571             :  *     except Exception:
   19572             :  */
   19573             :   {
   19574             :     __Pyx_PyThreadState_declare
   19575             :     __Pyx_PyThreadState_assign
   19576             :     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
   19577             :     __Pyx_XGOTREF(__pyx_t_1);
   19578             :     __Pyx_XGOTREF(__pyx_t_2);
   19579             :     __Pyx_XGOTREF(__pyx_t_3);
   19580             :     /*try:*/ {
   19581             : 
   19582             :       /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1029
   19583             :  * cdef inline int import_umath() except -1:
   19584             :  *     try:
   19585             :  *         _import_umath()             # <<<<<<<<<<<<<<
   19586             :  *     except Exception:
   19587             :  *         raise ImportError("numpy._core.umath failed to import")
   19588             :  */
   19589             :       __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1029, __pyx_L3_error)
   19590             : 
   19591             :       /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1028
   19592             :  * 
   19593             :  * cdef inline int import_umath() except -1:
   19594             :  *     try:             # <<<<<<<<<<<<<<
   19595             :  *         _import_umath()
   19596             :  *     except Exception:
   19597             :  */
   19598             :     }
   19599             :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   19600             :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   19601             :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   19602             :     goto __pyx_L8_try_end;
   19603             :     __pyx_L3_error:;
   19604             : 
   19605             :     /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1030
   19606             :  *     try:
   19607             :  *         _import_umath()
   19608             :  *     except Exception:             # <<<<<<<<<<<<<<
   19609             :  *         raise ImportError("numpy._core.umath failed to import")
   19610             :  * 
   19611             :  */
   19612             :     __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
   19613             :     if (__pyx_t_4) {
   19614             :       __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19615             :       if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1030, __pyx_L5_except_error)
   19616             :       __Pyx_XGOTREF(__pyx_t_5);
   19617             :       __Pyx_XGOTREF(__pyx_t_6);
   19618             :       __Pyx_XGOTREF(__pyx_t_7);
   19619             : 
   19620             :       /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1031
   19621             :  *         _import_umath()
   19622             :  *     except Exception:
   19623             :  *         raise ImportError("numpy._core.umath failed to import")             # <<<<<<<<<<<<<<
   19624             :  * 
   19625             :  * cdef inline int import_ufunc() except -1:
   19626             :  */
   19627             :       __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1031, __pyx_L5_except_error)
   19628             :       __Pyx_GOTREF(__pyx_t_8);
   19629             :       __Pyx_Raise(__pyx_t_8, 0, 0, 0);
   19630             :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   19631             :       __PYX_ERR(2, 1031, __pyx_L5_except_error)
   19632             :     }
   19633             :     goto __pyx_L5_except_error;
   19634             : 
   19635             :     /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1028
   19636             :  * 
   19637             :  * cdef inline int import_umath() except -1:
   19638             :  *     try:             # <<<<<<<<<<<<<<
   19639             :  *         _import_umath()
   19640             :  *     except Exception:
   19641             :  */
   19642             :     __pyx_L5_except_error:;
   19643             :     __Pyx_XGIVEREF(__pyx_t_1);
   19644             :     __Pyx_XGIVEREF(__pyx_t_2);
   19645             :     __Pyx_XGIVEREF(__pyx_t_3);
   19646             :     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
   19647             :     goto __pyx_L1_error;
   19648             :     __pyx_L8_try_end:;
   19649             :   }
   19650             : 
   19651             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1027
   19652             :  *         raise ImportError("numpy._core.multiarray failed to import")
   19653             :  * 
   19654             :  * cdef inline int import_umath() except -1:             # <<<<<<<<<<<<<<
   19655             :  *     try:
   19656             :  *         _import_umath()
   19657             :  */
   19658             : 
   19659             :   /* function exit code */
   19660             :   __pyx_r = 0;
   19661             :   goto __pyx_L0;
   19662             :   __pyx_L1_error:;
   19663             :   __Pyx_XDECREF(__pyx_t_5);
   19664             :   __Pyx_XDECREF(__pyx_t_6);
   19665             :   __Pyx_XDECREF(__pyx_t_7);
   19666             :   __Pyx_XDECREF(__pyx_t_8);
   19667             :   __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19668             :   __pyx_r = -1;
   19669             :   __pyx_L0:;
   19670             :   __Pyx_RefNannyFinishContext();
   19671             :   return __pyx_r;
   19672             : }
   19673             : 
   19674             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1033
   19675             :  *         raise ImportError("numpy._core.umath failed to import")
   19676             :  * 
   19677             :  * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
   19678             :  *     try:
   19679             :  *         _import_umath()
   19680             :  */
   19681             : 
   19682             : static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
   19683             :   int __pyx_r;
   19684             :   __Pyx_RefNannyDeclarations
   19685             :   PyObject *__pyx_t_1 = NULL;
   19686             :   PyObject *__pyx_t_2 = NULL;
   19687             :   PyObject *__pyx_t_3 = NULL;
   19688             :   int __pyx_t_4;
   19689             :   PyObject *__pyx_t_5 = NULL;
   19690             :   PyObject *__pyx_t_6 = NULL;
   19691             :   PyObject *__pyx_t_7 = NULL;
   19692             :   PyObject *__pyx_t_8 = NULL;
   19693             :   int __pyx_lineno = 0;
   19694             :   const char *__pyx_filename = NULL;
   19695             :   int __pyx_clineno = 0;
   19696             :   __Pyx_RefNannySetupContext("import_ufunc", 1);
   19697             : 
   19698             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1034
   19699             :  * 
   19700             :  * cdef inline int import_ufunc() except -1:
   19701             :  *     try:             # <<<<<<<<<<<<<<
   19702             :  *         _import_umath()
   19703             :  *     except Exception:
   19704             :  */
   19705             :   {
   19706             :     __Pyx_PyThreadState_declare
   19707             :     __Pyx_PyThreadState_assign
   19708             :     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
   19709             :     __Pyx_XGOTREF(__pyx_t_1);
   19710             :     __Pyx_XGOTREF(__pyx_t_2);
   19711             :     __Pyx_XGOTREF(__pyx_t_3);
   19712             :     /*try:*/ {
   19713             : 
   19714             :       /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1035
   19715             :  * cdef inline int import_ufunc() except -1:
   19716             :  *     try:
   19717             :  *         _import_umath()             # <<<<<<<<<<<<<<
   19718             :  *     except Exception:
   19719             :  *         raise ImportError("numpy._core.umath failed to import")
   19720             :  */
   19721             :       __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1035, __pyx_L3_error)
   19722             : 
   19723             :       /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1034
   19724             :  * 
   19725             :  * cdef inline int import_ufunc() except -1:
   19726             :  *     try:             # <<<<<<<<<<<<<<
   19727             :  *         _import_umath()
   19728             :  *     except Exception:
   19729             :  */
   19730             :     }
   19731             :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   19732             :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   19733             :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   19734             :     goto __pyx_L8_try_end;
   19735             :     __pyx_L3_error:;
   19736             : 
   19737             :     /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1036
   19738             :  *     try:
   19739             :  *         _import_umath()
   19740             :  *     except Exception:             # <<<<<<<<<<<<<<
   19741             :  *         raise ImportError("numpy._core.umath failed to import")
   19742             :  * 
   19743             :  */
   19744             :     __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
   19745             :     if (__pyx_t_4) {
   19746             :       __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19747             :       if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1036, __pyx_L5_except_error)
   19748             :       __Pyx_XGOTREF(__pyx_t_5);
   19749             :       __Pyx_XGOTREF(__pyx_t_6);
   19750             :       __Pyx_XGOTREF(__pyx_t_7);
   19751             : 
   19752             :       /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1037
   19753             :  *         _import_umath()
   19754             :  *     except Exception:
   19755             :  *         raise ImportError("numpy._core.umath failed to import")             # <<<<<<<<<<<<<<
   19756             :  * 
   19757             :  * 
   19758             :  */
   19759             :       __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1037, __pyx_L5_except_error)
   19760             :       __Pyx_GOTREF(__pyx_t_8);
   19761             :       __Pyx_Raise(__pyx_t_8, 0, 0, 0);
   19762             :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   19763             :       __PYX_ERR(2, 1037, __pyx_L5_except_error)
   19764             :     }
   19765             :     goto __pyx_L5_except_error;
   19766             : 
   19767             :     /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1034
   19768             :  * 
   19769             :  * cdef inline int import_ufunc() except -1:
   19770             :  *     try:             # <<<<<<<<<<<<<<
   19771             :  *         _import_umath()
   19772             :  *     except Exception:
   19773             :  */
   19774             :     __pyx_L5_except_error:;
   19775             :     __Pyx_XGIVEREF(__pyx_t_1);
   19776             :     __Pyx_XGIVEREF(__pyx_t_2);
   19777             :     __Pyx_XGIVEREF(__pyx_t_3);
   19778             :     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
   19779             :     goto __pyx_L1_error;
   19780             :     __pyx_L8_try_end:;
   19781             :   }
   19782             : 
   19783             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1033
   19784             :  *         raise ImportError("numpy._core.umath failed to import")
   19785             :  * 
   19786             :  * cdef inline int import_ufunc() except -1:             # <<<<<<<<<<<<<<
   19787             :  *     try:
   19788             :  *         _import_umath()
   19789             :  */
   19790             : 
   19791             :   /* function exit code */
   19792             :   __pyx_r = 0;
   19793             :   goto __pyx_L0;
   19794             :   __pyx_L1_error:;
   19795             :   __Pyx_XDECREF(__pyx_t_5);
   19796             :   __Pyx_XDECREF(__pyx_t_6);
   19797             :   __Pyx_XDECREF(__pyx_t_7);
   19798             :   __Pyx_XDECREF(__pyx_t_8);
   19799             :   __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
   19800             :   __pyx_r = -1;
   19801             :   __pyx_L0:;
   19802             :   __Pyx_RefNannyFinishContext();
   19803             :   return __pyx_r;
   19804             : }
   19805             : 
   19806             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1040
   19807             :  * 
   19808             :  * 
   19809             :  * cdef inline bint is_timedelta64_object(object obj) noexcept:             # <<<<<<<<<<<<<<
   19810             :  *     """
   19811             :  *     Cython equivalent of `isinstance(obj, np.timedelta64)`
   19812             :  */
   19813             : 
   19814             : static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) {
   19815             :   int __pyx_r;
   19816             : 
   19817             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1052
   19818             :  *     bool
   19819             :  *     """
   19820             :  *     return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type)             # <<<<<<<<<<<<<<
   19821             :  * 
   19822             :  * 
   19823             :  */
   19824             :   __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type));
   19825             :   goto __pyx_L0;
   19826             : 
   19827             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1040
   19828             :  * 
   19829             :  * 
   19830             :  * cdef inline bint is_timedelta64_object(object obj) noexcept:             # <<<<<<<<<<<<<<
   19831             :  *     """
   19832             :  *     Cython equivalent of `isinstance(obj, np.timedelta64)`
   19833             :  */
   19834             : 
   19835             :   /* function exit code */
   19836             :   __pyx_L0:;
   19837             :   return __pyx_r;
   19838             : }
   19839             : 
   19840             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1055
   19841             :  * 
   19842             :  * 
   19843             :  * cdef inline bint is_datetime64_object(object obj) noexcept:             # <<<<<<<<<<<<<<
   19844             :  *     """
   19845             :  *     Cython equivalent of `isinstance(obj, np.datetime64)`
   19846             :  */
   19847             : 
   19848             : static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) {
   19849             :   int __pyx_r;
   19850             : 
   19851             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1067
   19852             :  *     bool
   19853             :  *     """
   19854             :  *     return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type)             # <<<<<<<<<<<<<<
   19855             :  * 
   19856             :  * 
   19857             :  */
   19858             :   __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type));
   19859             :   goto __pyx_L0;
   19860             : 
   19861             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1055
   19862             :  * 
   19863             :  * 
   19864             :  * cdef inline bint is_datetime64_object(object obj) noexcept:             # <<<<<<<<<<<<<<
   19865             :  *     """
   19866             :  *     Cython equivalent of `isinstance(obj, np.datetime64)`
   19867             :  */
   19868             : 
   19869             :   /* function exit code */
   19870             :   __pyx_L0:;
   19871             :   return __pyx_r;
   19872             : }
   19873             : 
   19874             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1070
   19875             :  * 
   19876             :  * 
   19877             :  * cdef inline npy_datetime get_datetime64_value(object obj) noexcept nogil:             # <<<<<<<<<<<<<<
   19878             :  *     """
   19879             :  *     returns the int64 value underlying scalar numpy datetime64 object
   19880             :  */
   19881             : 
   19882             : static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) {
   19883             :   npy_datetime __pyx_r;
   19884             : 
   19885             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1077
   19886             :  *     also needed.  That can be found using `get_datetime64_unit`.
   19887             :  *     """
   19888             :  *     return (<PyDatetimeScalarObject*>obj).obval             # <<<<<<<<<<<<<<
   19889             :  * 
   19890             :  * 
   19891             :  */
   19892             :   __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval;
   19893             :   goto __pyx_L0;
   19894             : 
   19895             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1070
   19896             :  * 
   19897             :  * 
   19898             :  * cdef inline npy_datetime get_datetime64_value(object obj) noexcept nogil:             # <<<<<<<<<<<<<<
   19899             :  *     """
   19900             :  *     returns the int64 value underlying scalar numpy datetime64 object
   19901             :  */
   19902             : 
   19903             :   /* function exit code */
   19904             :   __pyx_L0:;
   19905             :   return __pyx_r;
   19906             : }
   19907             : 
   19908             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1080
   19909             :  * 
   19910             :  * 
   19911             :  * cdef inline npy_timedelta get_timedelta64_value(object obj) noexcept nogil:             # <<<<<<<<<<<<<<
   19912             :  *     """
   19913             :  *     returns the int64 value underlying scalar numpy timedelta64 object
   19914             :  */
   19915             : 
   19916             : static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) {
   19917             :   npy_timedelta __pyx_r;
   19918             : 
   19919             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1084
   19920             :  *     returns the int64 value underlying scalar numpy timedelta64 object
   19921             :  *     """
   19922             :  *     return (<PyTimedeltaScalarObject*>obj).obval             # <<<<<<<<<<<<<<
   19923             :  * 
   19924             :  * 
   19925             :  */
   19926             :   __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval;
   19927             :   goto __pyx_L0;
   19928             : 
   19929             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1080
   19930             :  * 
   19931             :  * 
   19932             :  * cdef inline npy_timedelta get_timedelta64_value(object obj) noexcept nogil:             # <<<<<<<<<<<<<<
   19933             :  *     """
   19934             :  *     returns the int64 value underlying scalar numpy timedelta64 object
   19935             :  */
   19936             : 
   19937             :   /* function exit code */
   19938             :   __pyx_L0:;
   19939             :   return __pyx_r;
   19940             : }
   19941             : 
   19942             : /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1087
   19943             :  * 
   19944             :  * 
   19945             :  * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) noexcept nogil:             # <<<<<<<<<<<<<<
   19946             :  *     """
   19947             :  *     returns the unit part of the dtype for a numpy datetime64 object.
   19948             :  */
   19949             : 
   19950             : static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) {
   19951             :   NPY_DATETIMEUNIT __pyx_r;
   19952             : 
   19953             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1091
   19954             :  *     returns the unit part of the dtype for a numpy datetime64 object.
   19955             :  *     """
   19956             :  *     return <NPY_DATETIMEUNIT>(<PyDatetimeScalarObject*>obj).obmeta.base             # <<<<<<<<<<<<<<
   19957             :  * 
   19958             :  * 
   19959             :  */
   19960             :   __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base);
   19961             :   goto __pyx_L0;
   19962             : 
   19963             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1087
   19964             :  * 
   19965             :  * 
   19966             :  * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) noexcept nogil:             # <<<<<<<<<<<<<<
   19967             :  *     """
   19968             :  *     returns the unit part of the dtype for a numpy datetime64 object.
   19969             :  */
   19970             : 
   19971             :   /* function exit code */
   19972             :   __pyx_L0:;
   19973             :   return __pyx_r;
   19974             : }
   19975             : 
   19976             : /* "scipy/linalg/_decomp_lu_cython.pyx":22
   19977             :  * @cython.boundscheck(False)
   19978             :  * @cython.initializedcheck(False)
   19979             :  * cdef void lu_decompose(cnp.ndarray[lapack_t, ndim=2] a,             # <<<<<<<<<<<<<<
   19980             :  *                        cnp.ndarray[lapack_t, ndim=2] lu,
   19981             :  *                        int[::1] perm,
   19982             :  */
   19983             : 
   19984           6 : static void __pyx_fuse_0__pyx_f_5scipy_6linalg_17_decomp_lu_cython_lu_decompose(PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_lu, __Pyx_memviewslice __pyx_v_perm, int __pyx_v_permute_l) {
   19985           6 :   int __pyx_v_m;
   19986           6 :   int __pyx_v_n;
   19987           6 :   int __pyx_v_mn;
   19988           6 :   npy_intp __pyx_v_dims[2];
   19989           6 :   int __pyx_v_info;
   19990           6 :   int __pyx_v_ind1;
   19991           6 :   int __pyx_v_ind2;
   19992           6 :   int __pyx_v_tmp_int;
   19993           6 :   __pyx_t_5numpy_float32_t *__pyx_v_aa;
   19994           6 :   __pyx_t_5numpy_float32_t *__pyx_v_bb;
   19995           6 :   int *__pyx_v_ipiv;
   19996           6 :   PyObject *__pyx_v_b = NULL;
   19997           6 :   __Pyx_LocalBuf_ND __pyx_pybuffernd_a;
   19998           6 :   __Pyx_Buffer __pyx_pybuffer_a;
   19999           6 :   __Pyx_LocalBuf_ND __pyx_pybuffernd_lu;
   20000           6 :   __Pyx_Buffer __pyx_pybuffer_lu;
   20001             :   __Pyx_RefNannyDeclarations
   20002           6 :   int __pyx_t_1;
   20003           6 :   int __pyx_t_2;
   20004           6 :   int __pyx_t_3;
   20005           6 :   int __pyx_t_4;
   20006           6 :   PyObject *__pyx_t_5 = NULL;
   20007           6 :   Py_ssize_t __pyx_t_6;
   20008           6 :   Py_UCS4 __pyx_t_7;
   20009           6 :   PyObject *__pyx_t_8 = NULL;
   20010           6 :   Py_ssize_t __pyx_t_9;
   20011           6 :   Py_ssize_t __pyx_t_10;
   20012           6 :   PyObject *__pyx_t_11 = NULL;
   20013           6 :   PyObject *__pyx_t_12 = NULL;
   20014           6 :   PyObject *__pyx_t_13 = NULL;
   20015           6 :   long __pyx_t_14;
   20016           6 :   long __pyx_t_15;
   20017           6 :   int __pyx_t_16;
   20018           6 :   int __pyx_lineno = 0;
   20019           6 :   const char *__pyx_filename = NULL;
   20020           6 :   int __pyx_clineno = 0;
   20021           6 :   __Pyx_RefNannySetupContext("__pyx_fuse_0lu_decompose", 1);
   20022           6 :   __pyx_pybuffer_a.pybuffer.buf = NULL;
   20023           6 :   __pyx_pybuffer_a.refcount = 0;
   20024           6 :   __pyx_pybuffernd_a.data = NULL;
   20025           6 :   __pyx_pybuffernd_a.rcbuffer = &__pyx_pybuffer_a;
   20026           6 :   __pyx_pybuffer_lu.pybuffer.buf = NULL;
   20027           6 :   __pyx_pybuffer_lu.refcount = 0;
   20028           6 :   __pyx_pybuffernd_lu.data = NULL;
   20029           6 :   __pyx_pybuffernd_lu.rcbuffer = &__pyx_pybuffer_lu;
   20030             :   {
   20031           6 :     __Pyx_BufFmt_StackElem __pyx_stack[1];
   20032           6 :     if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a.rcbuffer->pybuffer, (PyObject*)__pyx_v_a, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 22, __pyx_L1_error)
   20033             :   }
   20034           6 :   __pyx_pybuffernd_a.diminfo[0].strides = __pyx_pybuffernd_a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a.diminfo[0].shape = __pyx_pybuffernd_a.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_a.diminfo[1].strides = __pyx_pybuffernd_a.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_a.diminfo[1].shape = __pyx_pybuffernd_a.rcbuffer->pybuffer.shape[1];
   20035             :   {
   20036           6 :     __Pyx_BufFmt_StackElem __pyx_stack[1];
   20037           6 :     if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lu.rcbuffer->pybuffer, (PyObject*)__pyx_v_lu, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float32_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 22, __pyx_L1_error)
   20038             :   }
   20039           6 :   __pyx_pybuffernd_lu.diminfo[0].strides = __pyx_pybuffernd_lu.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lu.diminfo[0].shape = __pyx_pybuffernd_lu.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_lu.diminfo[1].strides = __pyx_pybuffernd_lu.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_lu.diminfo[1].shape = __pyx_pybuffernd_lu.rcbuffer->pybuffer.shape[1];
   20040             : 
   20041             :   /* "scipy/linalg/_decomp_lu_cython.pyx":50
   20042             :  * 
   20043             :  *     """
   20044             :  *     cdef int m = a.shape[0], n = a.shape[1], mn = min(m, n)             # <<<<<<<<<<<<<<
   20045             :  *     cdef cnp.npy_intp dims[2]
   20046             :  *     cdef int info = 0, ind1, ind2, tmp_int
   20047             :  */
   20048           6 :   __pyx_v_m = (__pyx_f_5numpy_7ndarray_5shape_shape(((PyArrayObject *)__pyx_v_a))[0]);
   20049           6 :   __pyx_v_n = (__pyx_f_5numpy_7ndarray_5shape_shape(((PyArrayObject *)__pyx_v_a))[1]);
   20050           6 :   __pyx_t_1 = __pyx_v_n;
   20051           6 :   __pyx_t_2 = __pyx_v_m;
   20052           6 :   __pyx_t_4 = (__pyx_t_1 < __pyx_t_2);
   20053           6 :   if (__pyx_t_4) {
   20054             :     __pyx_t_3 = __pyx_t_1;
   20055             :   } else {
   20056             :     __pyx_t_3 = __pyx_t_2;
   20057             :   }
   20058           6 :   __pyx_v_mn = __pyx_t_3;
   20059             : 
   20060             :   /* "scipy/linalg/_decomp_lu_cython.pyx":52
   20061             :  *     cdef int m = a.shape[0], n = a.shape[1], mn = min(m, n)
   20062             :  *     cdef cnp.npy_intp dims[2]
   20063             :  *     cdef int info = 0, ind1, ind2, tmp_int             # <<<<<<<<<<<<<<
   20064             :  *     cdef lapack_t *aa = <lapack_t *>cnp.PyArray_DATA(a)
   20065             :  *     cdef lapack_t *bb
   20066             :  */
   20067           6 :   __pyx_v_info = 0;
   20068             : 
   20069             :   /* "scipy/linalg/_decomp_lu_cython.pyx":53
   20070             :  *     cdef cnp.npy_intp dims[2]
   20071             :  *     cdef int info = 0, ind1, ind2, tmp_int
   20072             :  *     cdef lapack_t *aa = <lapack_t *>cnp.PyArray_DATA(a)             # <<<<<<<<<<<<<<
   20073             :  *     cdef lapack_t *bb
   20074             :  *     cdef int *ipiv = <int*>PyMem_Malloc(m * sizeof(int))
   20075             :  */
   20076           6 :   __pyx_v_aa = ((__pyx_t_5numpy_float32_t *)PyArray_DATA(((PyArrayObject *)__pyx_v_a)));
   20077             : 
   20078             :   /* "scipy/linalg/_decomp_lu_cython.pyx":55
   20079             :  *     cdef lapack_t *aa = <lapack_t *>cnp.PyArray_DATA(a)
   20080             :  *     cdef lapack_t *bb
   20081             :  *     cdef int *ipiv = <int*>PyMem_Malloc(m * sizeof(int))             # <<<<<<<<<<<<<<
   20082             :  *     if not ipiv:
   20083             :  *         raise MemoryError('scipy.linalg.lu failed to allocate '
   20084             :  */
   20085           6 :   __pyx_v_ipiv = ((int *)PyMem_Malloc((__pyx_v_m * (sizeof(int)))));
   20086             : 
   20087             :   /* "scipy/linalg/_decomp_lu_cython.pyx":56
   20088             :  *     cdef lapack_t *bb
   20089             :  *     cdef int *ipiv = <int*>PyMem_Malloc(m * sizeof(int))
   20090             :  *     if not ipiv:             # <<<<<<<<<<<<<<
   20091             :  *         raise MemoryError('scipy.linalg.lu failed to allocate '
   20092             :  *                           'required memory.')
   20093             :  */
   20094           6 :   __pyx_t_4 = (!(__pyx_v_ipiv != 0));
   20095           6 :   if (unlikely(__pyx_t_4)) {
   20096             : 
   20097             :     /* "scipy/linalg/_decomp_lu_cython.pyx":57
   20098             :  *     cdef int *ipiv = <int*>PyMem_Malloc(m * sizeof(int))
   20099             :  *     if not ipiv:
   20100             :  *         raise MemoryError('scipy.linalg.lu failed to allocate '             # <<<<<<<<<<<<<<
   20101             :  *                           'required memory.')
   20102             :  *     dims[0] = m
   20103             :  */
   20104           0 :     __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 57, __pyx_L1_error)
   20105           0 :     __Pyx_GOTREF(__pyx_t_5);
   20106           0 :     __Pyx_Raise(__pyx_t_5, 0, 0, 0);
   20107           0 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   20108           0 :     __PYX_ERR(0, 57, __pyx_L1_error)
   20109             : 
   20110             :     /* "scipy/linalg/_decomp_lu_cython.pyx":56
   20111             :  *     cdef lapack_t *bb
   20112             :  *     cdef int *ipiv = <int*>PyMem_Malloc(m * sizeof(int))
   20113             :  *     if not ipiv:             # <<<<<<<<<<<<<<
   20114             :  *         raise MemoryError('scipy.linalg.lu failed to allocate '
   20115             :  *                           'required memory.')
   20116             :  */
   20117             :   }
   20118             : 
   20119             :   /* "scipy/linalg/_decomp_lu_cython.pyx":59
   20120             :  *         raise MemoryError('scipy.linalg.lu failed to allocate '
   20121             :  *                           'required memory.')
   20122             :  *     dims[0] = m             # <<<<<<<<<<<<<<
   20123             :  *     dims[1] = n
   20124             :  * 
   20125             :  */
   20126           6 :   (__pyx_v_dims[0]) = __pyx_v_m;
   20127             : 
   20128             :   /* "scipy/linalg/_decomp_lu_cython.pyx":60
   20129             :  *                           'required memory.')
   20130             :  *     dims[0] = m
   20131             :  *     dims[1] = n             # <<<<<<<<<<<<<<
   20132             :  * 
   20133             :  *     if lapack_t is cnp.float32_t:
   20134             :  */
   20135           6 :   (__pyx_v_dims[1]) = __pyx_v_n;
   20136             : 
   20137             :   /* "scipy/linalg/_decomp_lu_cython.pyx":63
   20138             :  * 
   20139             :  *     if lapack_t is cnp.float32_t:
   20140             :  *         b = cnp.PyArray_SimpleNew(2, dims, cnp.NPY_FLOAT32)             # <<<<<<<<<<<<<<
   20141             :  *         bb = <cnp.float32_t *>cnp.PyArray_DATA(b)
   20142             :  *         swap_c_and_f_layout(aa, bb, m, n)
   20143             :  */
   20144           6 :   __pyx_t_5 = PyArray_SimpleNew(2, __pyx_v_dims, NPY_FLOAT32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 63, __pyx_L1_error)
   20145           6 :   __Pyx_GOTREF(__pyx_t_5);
   20146           6 :   __pyx_v_b = __pyx_t_5;
   20147           6 :   __pyx_t_5 = 0;
   20148             : 
   20149             :   /* "scipy/linalg/_decomp_lu_cython.pyx":64
   20150             :  *     if lapack_t is cnp.float32_t:
   20151             :  *         b = cnp.PyArray_SimpleNew(2, dims, cnp.NPY_FLOAT32)
   20152             :  *         bb = <cnp.float32_t *>cnp.PyArray_DATA(b)             # <<<<<<<<<<<<<<
   20153             :  *         swap_c_and_f_layout(aa, bb, m, n)
   20154             :  *         sgetrf(&m, &n, bb, &m, ipiv, &info)
   20155             :  */
   20156           6 :   if (!(likely(((__pyx_v_b) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_b, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 64, __pyx_L1_error)
   20157           6 :   __pyx_v_bb = ((__pyx_t_5numpy_float32_t *)PyArray_DATA(((PyArrayObject *)__pyx_v_b)));
   20158             : 
   20159             :   /* "scipy/linalg/_decomp_lu_cython.pyx":65
   20160             :  *         b = cnp.PyArray_SimpleNew(2, dims, cnp.NPY_FLOAT32)
   20161             :  *         bb = <cnp.float32_t *>cnp.PyArray_DATA(b)
   20162             :  *         swap_c_and_f_layout(aa, bb, m, n)             # <<<<<<<<<<<<<<
   20163             :  *         sgetrf(&m, &n, bb, &m, ipiv, &info)
   20164             :  *     elif lapack_t is cnp.float64_t:
   20165             :  */
   20166           6 :   __pyx_fuse_0__pyx_f_5scipy_6linalg_23_cythonized_array_utils_swap_c_and_f_layout(__pyx_v_aa, __pyx_v_bb, __pyx_v_m, __pyx_v_n);
   20167             : 
   20168             :   /* "scipy/linalg/_decomp_lu_cython.pyx":66
   20169             :  *         bb = <cnp.float32_t *>cnp.PyArray_DATA(b)
   20170             :  *         swap_c_and_f_layout(aa, bb, m, n)
   20171             :  *         sgetrf(&m, &n, bb, &m, ipiv, &info)             # <<<<<<<<<<<<<<
   20172             :  *     elif lapack_t is cnp.float64_t:
   20173             :  *         b = cnp.PyArray_SimpleNew(2, dims, cnp.NPY_FLOAT64)
   20174             :  */
   20175           6 :   __pyx_f_5scipy_6linalg_13cython_lapack_sgetrf((&__pyx_v_m), (&__pyx_v_n), __pyx_v_bb, (&__pyx_v_m), __pyx_v_ipiv, (&__pyx_v_info));
   20176             : 
   20177             :   /* "scipy/linalg/_decomp_lu_cython.pyx":83
   20178             :  *         zgetrf(&m, &n, bb, &m, ipiv, &info)
   20179             :  * 
   20180             :  *     if info < 0:             # <<<<<<<<<<<<<<
   20181             :  *         raise ValueError('scipy.linalg.lu has encountered an internal'
   20182             :  *                          ' error in ?getrf routine with invalid value'
   20183             :  */
   20184           6 :   __pyx_t_4 = (__pyx_v_info < 0);
   20185           6 :   if (unlikely(__pyx_t_4)) {
   20186             : 
   20187             :     /* "scipy/linalg/_decomp_lu_cython.pyx":84
   20188             :  * 
   20189             :  *     if info < 0:
   20190             :  *         raise ValueError('scipy.linalg.lu has encountered an internal'             # <<<<<<<<<<<<<<
   20191             :  *                          ' error in ?getrf routine with invalid value'
   20192             :  *                          f' at {-info}-th parameter.')
   20193             :  */
   20194           0 :     __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 84, __pyx_L1_error)
   20195           0 :     __Pyx_GOTREF(__pyx_t_5);
   20196           0 :     __pyx_t_6 = 0;
   20197           0 :     __pyx_t_7 = 127;
   20198           0 :     __Pyx_INCREF(__pyx_kp_u_scipy_linalg_lu_has_encountered);
   20199           0 :     __pyx_t_6 += 90;
   20200           0 :     __Pyx_GIVEREF(__pyx_kp_u_scipy_linalg_lu_has_encountered);
   20201           0 :     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_scipy_linalg_lu_has_encountered);
   20202             : 
   20203             :     /* "scipy/linalg/_decomp_lu_cython.pyx":86
   20204             :  *         raise ValueError('scipy.linalg.lu has encountered an internal'
   20205             :  *                          ' error in ?getrf routine with invalid value'
   20206             :  *                          f' at {-info}-th parameter.')             # <<<<<<<<<<<<<<
   20207             :  * 
   20208             :  *     # Get the result back to C-contiguous layout and clean-up
   20209             :  */
   20210           0 :     __pyx_t_8 = __Pyx_PyUnicode_From_int((-__pyx_v_info), 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 86, __pyx_L1_error)
   20211           0 :     __Pyx_GOTREF(__pyx_t_8);
   20212           0 :     __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
   20213           0 :     __Pyx_GIVEREF(__pyx_t_8);
   20214           0 :     PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_8);
   20215           0 :     __pyx_t_8 = 0;
   20216           0 :     __Pyx_INCREF(__pyx_kp_u_th_parameter);
   20217           0 :     __pyx_t_6 += 14;
   20218           0 :     __Pyx_GIVEREF(__pyx_kp_u_th_parameter);
   20219           0 :     PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_th_parameter);
   20220             : 
   20221             :     /* "scipy/linalg/_decomp_lu_cython.pyx":84
   20222             :  * 
   20223             :  *     if info < 0:
   20224             :  *         raise ValueError('scipy.linalg.lu has encountered an internal'             # <<<<<<<<<<<<<<
   20225             :  *                          ' error in ?getrf routine with invalid value'
   20226             :  *                          f' at {-info}-th parameter.')
   20227             :  */
   20228           0 :     __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 84, __pyx_L1_error)
   20229           0 :     __Pyx_GOTREF(__pyx_t_8);
   20230           0 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   20231           0 :     __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 84, __pyx_L1_error)
   20232           0 :     __Pyx_GOTREF(__pyx_t_5);
   20233           0 :     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   20234           0 :     __Pyx_Raise(__pyx_t_5, 0, 0, 0);
   20235           0 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   20236           0 :     __PYX_ERR(0, 84, __pyx_L1_error)
   20237             : 
   20238             :     /* "scipy/linalg/_decomp_lu_cython.pyx":83
   20239             :  *         zgetrf(&m, &n, bb, &m, ipiv, &info)
   20240             :  * 
   20241             :  *     if info < 0:             # <<<<<<<<<<<<<<
   20242             :  *         raise ValueError('scipy.linalg.lu has encountered an internal'
   20243             :  *                          ' error in ?getrf routine with invalid value'
   20244             :  */
   20245             :   }
   20246             : 
   20247             :   /* "scipy/linalg/_decomp_lu_cython.pyx":89
   20248             :  * 
   20249             :  *     # Get the result back to C-contiguous layout and clean-up
   20250             :  *     swap_c_and_f_layout(bb, aa, n, m)             # <<<<<<<<<<<<<<
   20251             :  * 
   20252             :  *     # Convert swaps on A to permutations on L since A = P @ L @ U
   20253             :  */
   20254           6 :   __pyx_fuse_0__pyx_f_5scipy_6linalg_23_cythonized_array_utils_swap_c_and_f_layout(__pyx_v_bb, __pyx_v_aa, __pyx_v_n, __pyx_v_m);
   20255             : 
   20256             :   /* "scipy/linalg/_decomp_lu_cython.pyx":92
   20257             :  * 
   20258             :  *     # Convert swaps on A to permutations on L since A = P @ L @ U
   20259             :  *     try:             # <<<<<<<<<<<<<<
   20260             :  *         # Basically we are following the cycles in ipiv
   20261             :  *         # and swapping an "np.arange" array for the inverse perm.
   20262             :  */
   20263             :   /*try:*/ {
   20264             : 
   20265             :     /* "scipy/linalg/_decomp_lu_cython.pyx":96
   20266             :  *         # and swapping an "np.arange" array for the inverse perm.
   20267             :  *         # Initialize perm
   20268             :  *         for ind1 in range(m): perm[ind1] = ind1             # <<<<<<<<<<<<<<
   20269             :  *         for ind1 in range(mn):
   20270             :  *             tmp_int = perm[ipiv[ind1]-1]
   20271             :  */
   20272           6 :     __pyx_t_3 = __pyx_v_m;
   20273           6 :     __pyx_t_1 = __pyx_t_3;
   20274          24 :     for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   20275          18 :       __pyx_v_ind1 = __pyx_t_2;
   20276          18 :       __pyx_t_9 = __pyx_v_ind1;
   20277          18 :       *((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) )) = __pyx_v_ind1;
   20278             :     }
   20279             : 
   20280             :     /* "scipy/linalg/_decomp_lu_cython.pyx":97
   20281             :  *         # Initialize perm
   20282             :  *         for ind1 in range(m): perm[ind1] = ind1
   20283             :  *         for ind1 in range(mn):             # <<<<<<<<<<<<<<
   20284             :  *             tmp_int = perm[ipiv[ind1]-1]
   20285             :  *             perm[ipiv[ind1]-1] = perm[ind1]
   20286             :  */
   20287          24 :     __pyx_t_3 = __pyx_v_mn;
   20288          24 :     __pyx_t_1 = __pyx_t_3;
   20289          24 :     for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   20290          18 :       __pyx_v_ind1 = __pyx_t_2;
   20291             : 
   20292             :       /* "scipy/linalg/_decomp_lu_cython.pyx":98
   20293             :  *         for ind1 in range(m): perm[ind1] = ind1
   20294             :  *         for ind1 in range(mn):
   20295             :  *             tmp_int = perm[ipiv[ind1]-1]             # <<<<<<<<<<<<<<
   20296             :  *             perm[ipiv[ind1]-1] = perm[ind1]
   20297             :  *             perm[ind1] = tmp_int
   20298             :  */
   20299          18 :       __pyx_t_9 = ((__pyx_v_ipiv[__pyx_v_ind1]) - 1);
   20300          18 :       __pyx_v_tmp_int = (*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) )));
   20301             : 
   20302             :       /* "scipy/linalg/_decomp_lu_cython.pyx":99
   20303             :  *         for ind1 in range(mn):
   20304             :  *             tmp_int = perm[ipiv[ind1]-1]
   20305             :  *             perm[ipiv[ind1]-1] = perm[ind1]             # <<<<<<<<<<<<<<
   20306             :  *             perm[ind1] = tmp_int
   20307             :  * 
   20308             :  */
   20309          18 :       __pyx_t_9 = __pyx_v_ind1;
   20310          18 :       __pyx_t_10 = ((__pyx_v_ipiv[__pyx_v_ind1]) - 1);
   20311          18 :       *((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_10)) )) = (*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) )));
   20312             : 
   20313             :       /* "scipy/linalg/_decomp_lu_cython.pyx":100
   20314             :  *             tmp_int = perm[ipiv[ind1]-1]
   20315             :  *             perm[ipiv[ind1]-1] = perm[ind1]
   20316             :  *             perm[ind1] = tmp_int             # <<<<<<<<<<<<<<
   20317             :  * 
   20318             :  *         # convert iperm to perm into ipiv and store back into perm
   20319             :  */
   20320          18 :       __pyx_t_9 = __pyx_v_ind1;
   20321          18 :       *((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) )) = __pyx_v_tmp_int;
   20322             :     }
   20323             : 
   20324             :     /* "scipy/linalg/_decomp_lu_cython.pyx":104
   20325             :  *         # convert iperm to perm into ipiv and store back into perm
   20326             :  *         # as final. Solution without argsort : ipiv[perm] = np.arange(m)
   20327             :  *         for ind1 in range(m):             # <<<<<<<<<<<<<<
   20328             :  *             ipiv[perm[ind1]] = ind1
   20329             :  *         for ind1 in range(m):
   20330             :  */
   20331          24 :     __pyx_t_3 = __pyx_v_m;
   20332          24 :     __pyx_t_1 = __pyx_t_3;
   20333          24 :     for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   20334          18 :       __pyx_v_ind1 = __pyx_t_2;
   20335             : 
   20336             :       /* "scipy/linalg/_decomp_lu_cython.pyx":105
   20337             :  *         # as final. Solution without argsort : ipiv[perm] = np.arange(m)
   20338             :  *         for ind1 in range(m):
   20339             :  *             ipiv[perm[ind1]] = ind1             # <<<<<<<<<<<<<<
   20340             :  *         for ind1 in range(m):
   20341             :  *             perm[ind1] = ipiv[ind1]
   20342             :  */
   20343          18 :       __pyx_t_9 = __pyx_v_ind1;
   20344          18 :       (__pyx_v_ipiv[(*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) )))]) = __pyx_v_ind1;
   20345             :     }
   20346             : 
   20347             :     /* "scipy/linalg/_decomp_lu_cython.pyx":106
   20348             :  *         for ind1 in range(m):
   20349             :  *             ipiv[perm[ind1]] = ind1
   20350             :  *         for ind1 in range(m):             # <<<<<<<<<<<<<<
   20351             :  *             perm[ind1] = ipiv[ind1]
   20352             :  * 
   20353             :  */
   20354           6 :     __pyx_t_3 = __pyx_v_m;
   20355           6 :     __pyx_t_1 = __pyx_t_3;
   20356          24 :     for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   20357          18 :       __pyx_v_ind1 = __pyx_t_2;
   20358             : 
   20359             :       /* "scipy/linalg/_decomp_lu_cython.pyx":107
   20360             :  *             ipiv[perm[ind1]] = ind1
   20361             :  *         for ind1 in range(m):
   20362             :  *             perm[ind1] = ipiv[ind1]             # <<<<<<<<<<<<<<
   20363             :  * 
   20364             :  *     finally:
   20365             :  */
   20366          18 :       __pyx_t_9 = __pyx_v_ind1;
   20367          18 :       *((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) )) = (__pyx_v_ipiv[__pyx_v_ind1]);
   20368             :     }
   20369             :   }
   20370             : 
   20371             :   /* "scipy/linalg/_decomp_lu_cython.pyx":110
   20372             :  * 
   20373             :  *     finally:
   20374             :  *         PyMem_Free(ipiv)             # <<<<<<<<<<<<<<
   20375             :  * 
   20376             :  *     # Separation of L and U parts
   20377             :  */
   20378             :   /*finally:*/ {
   20379             :     /*normal exit:*/{
   20380           6 :       PyMem_Free(__pyx_v_ipiv);
   20381           6 :       goto __pyx_L7;
   20382             :     }
   20383           6 :     __pyx_L7:;
   20384             :   }
   20385             : 
   20386             :   /* "scipy/linalg/_decomp_lu_cython.pyx":114
   20387             :  *     # Separation of L and U parts
   20388             :  * 
   20389             :  *     if m > n:  # tall, "a" holds bigger L             # <<<<<<<<<<<<<<
   20390             :  *         # Extract upper right rectangle to lu
   20391             :  *         for ind1 in range(mn):  # rows
   20392             :  */
   20393           6 :   __pyx_t_4 = (__pyx_v_m > __pyx_v_n);
   20394           6 :   if (__pyx_t_4) {
   20395             : 
   20396             :     /* "scipy/linalg/_decomp_lu_cython.pyx":116
   20397             :  *     if m > n:  # tall, "a" holds bigger L
   20398             :  *         # Extract upper right rectangle to lu
   20399             :  *         for ind1 in range(mn):  # rows             # <<<<<<<<<<<<<<
   20400             :  *             lu[ind1, ind1:mn] = a[ind1, ind1:mn]
   20401             :  * 
   20402             :  */
   20403           0 :     __pyx_t_3 = __pyx_v_mn;
   20404           0 :     __pyx_t_1 = __pyx_t_3;
   20405           0 :     for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   20406           0 :       __pyx_v_ind1 = __pyx_t_2;
   20407             : 
   20408             :       /* "scipy/linalg/_decomp_lu_cython.pyx":117
   20409             :  *         # Extract upper right rectangle to lu
   20410             :  *         for ind1 in range(mn):  # rows
   20411             :  *             lu[ind1, ind1:mn] = a[ind1, ind1:mn]             # <<<<<<<<<<<<<<
   20412             :  * 
   20413             :  *         for ind1 in range(mn):
   20414             :  */
   20415           0 :       __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 117, __pyx_L1_error)
   20416           0 :       __Pyx_GOTREF(__pyx_t_5);
   20417           0 :       __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 117, __pyx_L1_error)
   20418           0 :       __Pyx_GOTREF(__pyx_t_8);
   20419           0 :       __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_mn); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 117, __pyx_L1_error)
   20420           0 :       __Pyx_GOTREF(__pyx_t_11);
   20421           0 :       __pyx_t_12 = PySlice_New(__pyx_t_8, __pyx_t_11, Py_None); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 117, __pyx_L1_error)
   20422           0 :       __Pyx_GOTREF(__pyx_t_12);
   20423           0 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   20424           0 :       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   20425           0 :       __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 117, __pyx_L1_error)
   20426           0 :       __Pyx_GOTREF(__pyx_t_11);
   20427           0 :       __Pyx_GIVEREF(__pyx_t_5);
   20428           0 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_5)) __PYX_ERR(0, 117, __pyx_L1_error);
   20429           0 :       __Pyx_GIVEREF(__pyx_t_12);
   20430           0 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_12)) __PYX_ERR(0, 117, __pyx_L1_error);
   20431           0 :       __pyx_t_5 = 0;
   20432           0 :       __pyx_t_12 = 0;
   20433           0 :       __pyx_t_12 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_a), __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 117, __pyx_L1_error)
   20434           0 :       __Pyx_GOTREF(__pyx_t_12);
   20435           0 :       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   20436           0 :       __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 117, __pyx_L1_error)
   20437           0 :       __Pyx_GOTREF(__pyx_t_11);
   20438           0 :       __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 117, __pyx_L1_error)
   20439           0 :       __Pyx_GOTREF(__pyx_t_5);
   20440           0 :       __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_mn); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 117, __pyx_L1_error)
   20441           0 :       __Pyx_GOTREF(__pyx_t_8);
   20442           0 :       __pyx_t_13 = PySlice_New(__pyx_t_5, __pyx_t_8, Py_None); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 117, __pyx_L1_error)
   20443           0 :       __Pyx_GOTREF(__pyx_t_13);
   20444           0 :       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   20445           0 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   20446           0 :       __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 117, __pyx_L1_error)
   20447           0 :       __Pyx_GOTREF(__pyx_t_8);
   20448           0 :       __Pyx_GIVEREF(__pyx_t_11);
   20449           0 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_11)) __PYX_ERR(0, 117, __pyx_L1_error);
   20450           0 :       __Pyx_GIVEREF(__pyx_t_13);
   20451           0 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_13)) __PYX_ERR(0, 117, __pyx_L1_error);
   20452           0 :       __pyx_t_11 = 0;
   20453           0 :       __pyx_t_13 = 0;
   20454           0 :       if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_lu), __pyx_t_8, __pyx_t_12) < 0))) __PYX_ERR(0, 117, __pyx_L1_error)
   20455           0 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   20456           0 :       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
   20457             :     }
   20458             : 
   20459             :     /* "scipy/linalg/_decomp_lu_cython.pyx":119
   20460             :  *             lu[ind1, ind1:mn] = a[ind1, ind1:mn]
   20461             :  * 
   20462             :  *         for ind1 in range(mn):             # <<<<<<<<<<<<<<
   20463             :  *             a[ind1, ind1] = 1
   20464             :  *             a[ind1, ind1+1:mn] = 0
   20465             :  */
   20466           0 :     __pyx_t_3 = __pyx_v_mn;
   20467           0 :     __pyx_t_1 = __pyx_t_3;
   20468           0 :     for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   20469           0 :       __pyx_v_ind1 = __pyx_t_2;
   20470             : 
   20471             :       /* "scipy/linalg/_decomp_lu_cython.pyx":120
   20472             :  * 
   20473             :  *         for ind1 in range(mn):
   20474             :  *             a[ind1, ind1] = 1             # <<<<<<<<<<<<<<
   20475             :  *             a[ind1, ind1+1:mn] = 0
   20476             :  * 
   20477             :  */
   20478           0 :       __pyx_t_9 = __pyx_v_ind1;
   20479           0 :       __pyx_t_10 = __pyx_v_ind1;
   20480           0 :       *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_a.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_a.diminfo[1].strides) = 1.0;
   20481             : 
   20482             :       /* "scipy/linalg/_decomp_lu_cython.pyx":121
   20483             :  *         for ind1 in range(mn):
   20484             :  *             a[ind1, ind1] = 1
   20485             :  *             a[ind1, ind1+1:mn] = 0             # <<<<<<<<<<<<<<
   20486             :  * 
   20487             :  *     else:  # square or fat, "a" holds bigger U
   20488             :  */
   20489           0 :       __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 121, __pyx_L1_error)
   20490           0 :       __Pyx_GOTREF(__pyx_t_12);
   20491           0 :       __pyx_t_8 = __Pyx_PyInt_From_long((__pyx_v_ind1 + 1)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 121, __pyx_L1_error)
   20492           0 :       __Pyx_GOTREF(__pyx_t_8);
   20493           0 :       __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_mn); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 121, __pyx_L1_error)
   20494           0 :       __Pyx_GOTREF(__pyx_t_13);
   20495           0 :       __pyx_t_11 = PySlice_New(__pyx_t_8, __pyx_t_13, Py_None); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 121, __pyx_L1_error)
   20496           0 :       __Pyx_GOTREF(__pyx_t_11);
   20497           0 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   20498           0 :       __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   20499           0 :       __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 121, __pyx_L1_error)
   20500           0 :       __Pyx_GOTREF(__pyx_t_13);
   20501           0 :       __Pyx_GIVEREF(__pyx_t_12);
   20502           0 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12)) __PYX_ERR(0, 121, __pyx_L1_error);
   20503           0 :       __Pyx_GIVEREF(__pyx_t_11);
   20504           0 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_11)) __PYX_ERR(0, 121, __pyx_L1_error);
   20505           0 :       __pyx_t_12 = 0;
   20506           0 :       __pyx_t_11 = 0;
   20507           0 :       if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_a), __pyx_t_13, __pyx_int_0) < 0))) __PYX_ERR(0, 121, __pyx_L1_error)
   20508           0 :       __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   20509             :     }
   20510             : 
   20511             :     /* "scipy/linalg/_decomp_lu_cython.pyx":114
   20512             :  *     # Separation of L and U parts
   20513             :  * 
   20514             :  *     if m > n:  # tall, "a" holds bigger L             # <<<<<<<<<<<<<<
   20515             :  *         # Extract upper right rectangle to lu
   20516             :  *         for ind1 in range(mn):  # rows
   20517             :  */
   20518           0 :     goto __pyx_L16;
   20519             :   }
   20520             : 
   20521             :   /* "scipy/linalg/_decomp_lu_cython.pyx":125
   20522             :  *     else:  # square or fat, "a" holds bigger U
   20523             :  * 
   20524             :  *         lu[0, 0] = 1             # <<<<<<<<<<<<<<
   20525             :  *         for ind1 in range(1, mn):  # rows
   20526             :  *             lu[ind1, :ind1] = a[ind1, :ind1]
   20527             :  */
   20528             :   /*else*/ {
   20529           6 :     __pyx_t_10 = 0;
   20530           6 :     __pyx_t_9 = 0;
   20531           6 :     *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_lu.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_lu.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_lu.diminfo[1].strides) = 1.0;
   20532             : 
   20533             :     /* "scipy/linalg/_decomp_lu_cython.pyx":126
   20534             :  * 
   20535             :  *         lu[0, 0] = 1
   20536             :  *         for ind1 in range(1, mn):  # rows             # <<<<<<<<<<<<<<
   20537             :  *             lu[ind1, :ind1] = a[ind1, :ind1]
   20538             :  *             lu[ind1, ind1] = 1
   20539             :  */
   20540           6 :     __pyx_t_3 = __pyx_v_mn;
   20541           6 :     __pyx_t_1 = __pyx_t_3;
   20542          18 :     for (__pyx_t_2 = 1; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   20543          12 :       __pyx_v_ind1 = __pyx_t_2;
   20544             : 
   20545             :       /* "scipy/linalg/_decomp_lu_cython.pyx":127
   20546             :  *         lu[0, 0] = 1
   20547             :  *         for ind1 in range(1, mn):  # rows
   20548             :  *             lu[ind1, :ind1] = a[ind1, :ind1]             # <<<<<<<<<<<<<<
   20549             :  *             lu[ind1, ind1] = 1
   20550             :  * 
   20551             :  */
   20552          12 :       __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 127, __pyx_L1_error)
   20553          12 :       __Pyx_GOTREF(__pyx_t_13);
   20554          12 :       __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 127, __pyx_L1_error)
   20555          12 :       __Pyx_GOTREF(__pyx_t_11);
   20556          12 :       __pyx_t_12 = PySlice_New(Py_None, __pyx_t_11, Py_None); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 127, __pyx_L1_error)
   20557          12 :       __Pyx_GOTREF(__pyx_t_12);
   20558          12 :       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   20559          12 :       __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 127, __pyx_L1_error)
   20560          12 :       __Pyx_GOTREF(__pyx_t_11);
   20561          12 :       __Pyx_GIVEREF(__pyx_t_13);
   20562          12 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13)) __PYX_ERR(0, 127, __pyx_L1_error);
   20563          12 :       __Pyx_GIVEREF(__pyx_t_12);
   20564          12 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_12)) __PYX_ERR(0, 127, __pyx_L1_error);
   20565          12 :       __pyx_t_13 = 0;
   20566          12 :       __pyx_t_12 = 0;
   20567          12 :       __pyx_t_12 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_a), __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 127, __pyx_L1_error)
   20568          12 :       __Pyx_GOTREF(__pyx_t_12);
   20569          12 :       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   20570          12 :       __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 127, __pyx_L1_error)
   20571          12 :       __Pyx_GOTREF(__pyx_t_11);
   20572          12 :       __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 127, __pyx_L1_error)
   20573          12 :       __Pyx_GOTREF(__pyx_t_13);
   20574          12 :       __pyx_t_8 = PySlice_New(Py_None, __pyx_t_13, Py_None); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 127, __pyx_L1_error)
   20575          12 :       __Pyx_GOTREF(__pyx_t_8);
   20576          12 :       __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   20577          12 :       __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 127, __pyx_L1_error)
   20578          12 :       __Pyx_GOTREF(__pyx_t_13);
   20579          12 :       __Pyx_GIVEREF(__pyx_t_11);
   20580          12 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_11)) __PYX_ERR(0, 127, __pyx_L1_error);
   20581          12 :       __Pyx_GIVEREF(__pyx_t_8);
   20582          12 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_8)) __PYX_ERR(0, 127, __pyx_L1_error);
   20583          12 :       __pyx_t_11 = 0;
   20584          12 :       __pyx_t_8 = 0;
   20585          12 :       if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_lu), __pyx_t_13, __pyx_t_12) < 0))) __PYX_ERR(0, 127, __pyx_L1_error)
   20586          12 :       __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   20587          12 :       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
   20588             : 
   20589             :       /* "scipy/linalg/_decomp_lu_cython.pyx":128
   20590             :  *         for ind1 in range(1, mn):  # rows
   20591             :  *             lu[ind1, :ind1] = a[ind1, :ind1]
   20592             :  *             lu[ind1, ind1] = 1             # <<<<<<<<<<<<<<
   20593             :  * 
   20594             :  *         for ind2 in range(mn - 1):  # cols
   20595             :  */
   20596          12 :       __pyx_t_9 = __pyx_v_ind1;
   20597          12 :       __pyx_t_10 = __pyx_v_ind1;
   20598          12 :       *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_lu.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_lu.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_lu.diminfo[1].strides) = 1.0;
   20599             :     }
   20600             : 
   20601             :     /* "scipy/linalg/_decomp_lu_cython.pyx":130
   20602             :  *             lu[ind1, ind1] = 1
   20603             :  * 
   20604             :  *         for ind2 in range(mn - 1):  # cols             # <<<<<<<<<<<<<<
   20605             :  *             for ind1 in range(ind2+1, m):  # rows
   20606             :  *                 a[ind1, ind2] = 0
   20607             :  */
   20608           6 :     __pyx_t_14 = (__pyx_v_mn - 1);
   20609           6 :     __pyx_t_15 = __pyx_t_14;
   20610          18 :     for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_15; __pyx_t_3+=1) {
   20611          12 :       __pyx_v_ind2 = __pyx_t_3;
   20612             : 
   20613             :       /* "scipy/linalg/_decomp_lu_cython.pyx":131
   20614             :  * 
   20615             :  *         for ind2 in range(mn - 1):  # cols
   20616             :  *             for ind1 in range(ind2+1, m):  # rows             # <<<<<<<<<<<<<<
   20617             :  *                 a[ind1, ind2] = 0
   20618             :  * 
   20619             :  */
   20620          12 :       __pyx_t_1 = __pyx_v_m;
   20621          12 :       __pyx_t_2 = __pyx_t_1;
   20622          30 :       for (__pyx_t_16 = (__pyx_v_ind2 + 1); __pyx_t_16 < __pyx_t_2; __pyx_t_16+=1) {
   20623          18 :         __pyx_v_ind1 = __pyx_t_16;
   20624             : 
   20625             :         /* "scipy/linalg/_decomp_lu_cython.pyx":132
   20626             :  *         for ind2 in range(mn - 1):  # cols
   20627             :  *             for ind1 in range(ind2+1, m):  # rows
   20628             :  *                 a[ind1, ind2] = 0             # <<<<<<<<<<<<<<
   20629             :  * 
   20630             :  *     if permute_l:
   20631             :  */
   20632          18 :         __pyx_t_10 = __pyx_v_ind1;
   20633          18 :         __pyx_t_9 = __pyx_v_ind2;
   20634          18 :         *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float32_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_a.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_a.diminfo[1].strides) = 0.0;
   20635             :       }
   20636             :     }
   20637             :   }
   20638           6 :   __pyx_L16:;
   20639             : 
   20640             :   /* "scipy/linalg/_decomp_lu_cython.pyx":134
   20641             :  *                 a[ind1, ind2] = 0
   20642             :  * 
   20643             :  *     if permute_l:             # <<<<<<<<<<<<<<
   20644             :  *         # b still exists -> use it as temp array
   20645             :  *         # we copy everything to b and pick back
   20646             :  */
   20647           6 :   if (__pyx_v_permute_l) {
   20648             : 
   20649             :     /* "scipy/linalg/_decomp_lu_cython.pyx":139
   20650             :  *         # rows from b as dictated by perm
   20651             :  * 
   20652             :  *         if m > n:             # <<<<<<<<<<<<<<
   20653             :  *             b[:, :] = a[:, :]
   20654             :  *             # memcpy(bb, &a[0, 0], m*mn*sizeof(lapack_t))
   20655             :  */
   20656           0 :     __pyx_t_4 = (__pyx_v_m > __pyx_v_n);
   20657           0 :     if (__pyx_t_4) {
   20658             : 
   20659             :       /* "scipy/linalg/_decomp_lu_cython.pyx":140
   20660             :  * 
   20661             :  *         if m > n:
   20662             :  *             b[:, :] = a[:, :]             # <<<<<<<<<<<<<<
   20663             :  *             # memcpy(bb, &a[0, 0], m*mn*sizeof(lapack_t))
   20664             :  *             for ind1 in range(m):
   20665             :  */
   20666           0 :       __pyx_t_12 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_a), __pyx_tuple__14); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 140, __pyx_L1_error)
   20667           0 :       __Pyx_GOTREF(__pyx_t_12);
   20668           0 :       if (unlikely((PyObject_SetItem(__pyx_v_b, __pyx_tuple__17, __pyx_t_12) < 0))) __PYX_ERR(0, 140, __pyx_L1_error)
   20669           0 :       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
   20670             : 
   20671             :       /* "scipy/linalg/_decomp_lu_cython.pyx":142
   20672             :  *             b[:, :] = a[:, :]
   20673             :  *             # memcpy(bb, &a[0, 0], m*mn*sizeof(lapack_t))
   20674             :  *             for ind1 in range(m):             # <<<<<<<<<<<<<<
   20675             :  *                 if perm[ind1] == ind1:
   20676             :  *                     continue
   20677             :  */
   20678           0 :       __pyx_t_3 = __pyx_v_m;
   20679           0 :       __pyx_t_1 = __pyx_t_3;
   20680           0 :       for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   20681           0 :         __pyx_v_ind1 = __pyx_t_2;
   20682             : 
   20683             :         /* "scipy/linalg/_decomp_lu_cython.pyx":143
   20684             :  *             # memcpy(bb, &a[0, 0], m*mn*sizeof(lapack_t))
   20685             :  *             for ind1 in range(m):
   20686             :  *                 if perm[ind1] == ind1:             # <<<<<<<<<<<<<<
   20687             :  *                     continue
   20688             :  *                 else:
   20689             :  */
   20690           0 :         __pyx_t_9 = __pyx_v_ind1;
   20691           0 :         __pyx_t_4 = ((*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) ))) == __pyx_v_ind1);
   20692           0 :         if (__pyx_t_4) {
   20693             : 
   20694             :           /* "scipy/linalg/_decomp_lu_cython.pyx":144
   20695             :  *             for ind1 in range(m):
   20696             :  *                 if perm[ind1] == ind1:
   20697             :  *                     continue             # <<<<<<<<<<<<<<
   20698             :  *                 else:
   20699             :  *                     a[ind1, :] = b[perm[ind1], :]
   20700             :  */
   20701           0 :           goto __pyx_L29_continue;
   20702             : 
   20703             :           /* "scipy/linalg/_decomp_lu_cython.pyx":143
   20704             :  *             # memcpy(bb, &a[0, 0], m*mn*sizeof(lapack_t))
   20705             :  *             for ind1 in range(m):
   20706             :  *                 if perm[ind1] == ind1:             # <<<<<<<<<<<<<<
   20707             :  *                     continue
   20708             :  *                 else:
   20709             :  */
   20710             :         }
   20711             : 
   20712             :         /* "scipy/linalg/_decomp_lu_cython.pyx":146
   20713             :  *                     continue
   20714             :  *                 else:
   20715             :  *                     a[ind1, :] = b[perm[ind1], :]             # <<<<<<<<<<<<<<
   20716             :  * 
   20717             :  *         else:  # same but for lu array
   20718             :  */
   20719             :         /*else*/ {
   20720           0 :           __pyx_t_9 = __pyx_v_ind1;
   20721           0 :           __pyx_t_12 = __Pyx_PyInt_From_int((*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) )))); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 146, __pyx_L1_error)
   20722           0 :           __Pyx_GOTREF(__pyx_t_12);
   20723           0 :           __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 146, __pyx_L1_error)
   20724           0 :           __Pyx_GOTREF(__pyx_t_13);
   20725           0 :           __Pyx_GIVEREF(__pyx_t_12);
   20726           0 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12)) __PYX_ERR(0, 146, __pyx_L1_error);
   20727           0 :           __Pyx_INCREF(__pyx_slice__18);
   20728           0 :           __Pyx_GIVEREF(__pyx_slice__18);
   20729           0 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_slice__18)) __PYX_ERR(0, 146, __pyx_L1_error);
   20730           0 :           __pyx_t_12 = 0;
   20731           0 :           __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_v_b, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 146, __pyx_L1_error)
   20732           0 :           __Pyx_GOTREF(__pyx_t_12);
   20733           0 :           __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   20734           0 :           __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 146, __pyx_L1_error)
   20735           0 :           __Pyx_GOTREF(__pyx_t_13);
   20736           0 :           __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 146, __pyx_L1_error)
   20737           0 :           __Pyx_GOTREF(__pyx_t_8);
   20738           0 :           __Pyx_GIVEREF(__pyx_t_13);
   20739           0 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_13)) __PYX_ERR(0, 146, __pyx_L1_error);
   20740           0 :           __Pyx_INCREF(__pyx_slice__19);
   20741           0 :           __Pyx_GIVEREF(__pyx_slice__19);
   20742           0 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_slice__19)) __PYX_ERR(0, 146, __pyx_L1_error);
   20743           0 :           __pyx_t_13 = 0;
   20744           0 :           if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_a), __pyx_t_8, __pyx_t_12) < 0))) __PYX_ERR(0, 146, __pyx_L1_error)
   20745           0 :           __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   20746           0 :           __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
   20747             :         }
   20748           0 :         __pyx_L29_continue:;
   20749             :       }
   20750             : 
   20751             :       /* "scipy/linalg/_decomp_lu_cython.pyx":139
   20752             :  *         # rows from b as dictated by perm
   20753             :  * 
   20754             :  *         if m > n:             # <<<<<<<<<<<<<<
   20755             :  *             b[:, :] = a[:, :]
   20756             :  *             # memcpy(bb, &a[0, 0], m*mn*sizeof(lapack_t))
   20757             :  */
   20758           0 :       goto __pyx_L28;
   20759             :     }
   20760             : 
   20761             :     /* "scipy/linalg/_decomp_lu_cython.pyx":149
   20762             :  * 
   20763             :  *         else:  # same but for lu array
   20764             :  *             b[:mn, :mn] = lu[:, :]             # <<<<<<<<<<<<<<
   20765             :  *             # memcpy(bb, &lu[0, 0], mn*n*sizeof(lapack_t))
   20766             :  *             for ind1 in range(mn):
   20767             :  */
   20768             :     /*else*/ {
   20769           0 :       __pyx_t_12 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_lu), __pyx_tuple__22); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 149, __pyx_L1_error)
   20770           0 :       __Pyx_GOTREF(__pyx_t_12);
   20771           0 :       __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_mn); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 149, __pyx_L1_error)
   20772           0 :       __Pyx_GOTREF(__pyx_t_8);
   20773           0 :       __pyx_t_13 = PySlice_New(Py_None, __pyx_t_8, Py_None); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 149, __pyx_L1_error)
   20774           0 :       __Pyx_GOTREF(__pyx_t_13);
   20775           0 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   20776           0 :       __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_mn); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 149, __pyx_L1_error)
   20777           0 :       __Pyx_GOTREF(__pyx_t_8);
   20778           0 :       __pyx_t_11 = PySlice_New(Py_None, __pyx_t_8, Py_None); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 149, __pyx_L1_error)
   20779           0 :       __Pyx_GOTREF(__pyx_t_11);
   20780           0 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   20781           0 :       __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 149, __pyx_L1_error)
   20782           0 :       __Pyx_GOTREF(__pyx_t_8);
   20783           0 :       __Pyx_GIVEREF(__pyx_t_13);
   20784           0 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_13)) __PYX_ERR(0, 149, __pyx_L1_error);
   20785           0 :       __Pyx_GIVEREF(__pyx_t_11);
   20786           0 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_11)) __PYX_ERR(0, 149, __pyx_L1_error);
   20787           0 :       __pyx_t_13 = 0;
   20788           0 :       __pyx_t_11 = 0;
   20789           0 :       if (unlikely((PyObject_SetItem(__pyx_v_b, __pyx_t_8, __pyx_t_12) < 0))) __PYX_ERR(0, 149, __pyx_L1_error)
   20790           0 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   20791           0 :       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
   20792             : 
   20793             :       /* "scipy/linalg/_decomp_lu_cython.pyx":151
   20794             :  *             b[:mn, :mn] = lu[:, :]
   20795             :  *             # memcpy(bb, &lu[0, 0], mn*n*sizeof(lapack_t))
   20796             :  *             for ind1 in range(mn):             # <<<<<<<<<<<<<<
   20797             :  *                 if perm[ind1] == ind1:
   20798             :  *                     continue
   20799             :  */
   20800           0 :       __pyx_t_3 = __pyx_v_mn;
   20801           0 :       __pyx_t_1 = __pyx_t_3;
   20802           0 :       for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   20803           0 :         __pyx_v_ind1 = __pyx_t_2;
   20804             : 
   20805             :         /* "scipy/linalg/_decomp_lu_cython.pyx":152
   20806             :  *             # memcpy(bb, &lu[0, 0], mn*n*sizeof(lapack_t))
   20807             :  *             for ind1 in range(mn):
   20808             :  *                 if perm[ind1] == ind1:             # <<<<<<<<<<<<<<
   20809             :  *                     continue
   20810             :  *                 else:
   20811             :  */
   20812           0 :         __pyx_t_9 = __pyx_v_ind1;
   20813           0 :         __pyx_t_4 = ((*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) ))) == __pyx_v_ind1);
   20814           0 :         if (__pyx_t_4) {
   20815             : 
   20816             :           /* "scipy/linalg/_decomp_lu_cython.pyx":153
   20817             :  *             for ind1 in range(mn):
   20818             :  *                 if perm[ind1] == ind1:
   20819             :  *                     continue             # <<<<<<<<<<<<<<
   20820             :  *                 else:
   20821             :  *                     lu[ind1, :] = b[perm[ind1], :mn]
   20822             :  */
   20823           0 :           goto __pyx_L32_continue;
   20824             : 
   20825             :           /* "scipy/linalg/_decomp_lu_cython.pyx":152
   20826             :  *             # memcpy(bb, &lu[0, 0], mn*n*sizeof(lapack_t))
   20827             :  *             for ind1 in range(mn):
   20828             :  *                 if perm[ind1] == ind1:             # <<<<<<<<<<<<<<
   20829             :  *                     continue
   20830             :  *                 else:
   20831             :  */
   20832             :         }
   20833             : 
   20834             :         /* "scipy/linalg/_decomp_lu_cython.pyx":155
   20835             :  *                     continue
   20836             :  *                 else:
   20837             :  *                     lu[ind1, :] = b[perm[ind1], :mn]             # <<<<<<<<<<<<<<
   20838             :  * 
   20839             :  * 
   20840             :  */
   20841             :         /*else*/ {
   20842           0 :           __pyx_t_9 = __pyx_v_ind1;
   20843           0 :           __pyx_t_12 = __Pyx_PyInt_From_int((*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) )))); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 155, __pyx_L1_error)
   20844           0 :           __Pyx_GOTREF(__pyx_t_12);
   20845           0 :           __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_mn); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 155, __pyx_L1_error)
   20846           0 :           __Pyx_GOTREF(__pyx_t_8);
   20847           0 :           __pyx_t_11 = PySlice_New(Py_None, __pyx_t_8, Py_None); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 155, __pyx_L1_error)
   20848           0 :           __Pyx_GOTREF(__pyx_t_11);
   20849           0 :           __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   20850           0 :           __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 155, __pyx_L1_error)
   20851           0 :           __Pyx_GOTREF(__pyx_t_8);
   20852           0 :           __Pyx_GIVEREF(__pyx_t_12);
   20853           0 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_12)) __PYX_ERR(0, 155, __pyx_L1_error);
   20854           0 :           __Pyx_GIVEREF(__pyx_t_11);
   20855           0 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_11)) __PYX_ERR(0, 155, __pyx_L1_error);
   20856           0 :           __pyx_t_12 = 0;
   20857           0 :           __pyx_t_11 = 0;
   20858           0 :           __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_v_b, __pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 155, __pyx_L1_error)
   20859           0 :           __Pyx_GOTREF(__pyx_t_11);
   20860           0 :           __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   20861           0 :           __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 155, __pyx_L1_error)
   20862           0 :           __Pyx_GOTREF(__pyx_t_8);
   20863           0 :           __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 155, __pyx_L1_error)
   20864           0 :           __Pyx_GOTREF(__pyx_t_12);
   20865           0 :           __Pyx_GIVEREF(__pyx_t_8);
   20866           0 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_8)) __PYX_ERR(0, 155, __pyx_L1_error);
   20867           0 :           __Pyx_INCREF(__pyx_slice__23);
   20868           0 :           __Pyx_GIVEREF(__pyx_slice__23);
   20869           0 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_slice__23)) __PYX_ERR(0, 155, __pyx_L1_error);
   20870           0 :           __pyx_t_8 = 0;
   20871           0 :           if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_lu), __pyx_t_12, __pyx_t_11) < 0))) __PYX_ERR(0, 155, __pyx_L1_error)
   20872           0 :           __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
   20873           0 :           __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   20874             :         }
   20875           0 :         __pyx_L32_continue:;
   20876             :       }
   20877             :     }
   20878           0 :     __pyx_L28:;
   20879             : 
   20880             :     /* "scipy/linalg/_decomp_lu_cython.pyx":134
   20881             :  *                 a[ind1, ind2] = 0
   20882             :  * 
   20883             :  *     if permute_l:             # <<<<<<<<<<<<<<
   20884             :  *         # b still exists -> use it as temp array
   20885             :  *         # we copy everything to b and pick back
   20886             :  */
   20887             :   }
   20888             : 
   20889             :   /* "scipy/linalg/_decomp_lu_cython.pyx":22
   20890             :  * @cython.boundscheck(False)
   20891             :  * @cython.initializedcheck(False)
   20892             :  * cdef void lu_decompose(cnp.ndarray[lapack_t, ndim=2] a,             # <<<<<<<<<<<<<<
   20893             :  *                        cnp.ndarray[lapack_t, ndim=2] lu,
   20894             :  *                        int[::1] perm,
   20895             :  */
   20896             : 
   20897             :   /* function exit code */
   20898           6 :   goto __pyx_L0;
   20899           0 :   __pyx_L1_error:;
   20900           0 :   __Pyx_XDECREF(__pyx_t_5);
   20901           0 :   __Pyx_XDECREF(__pyx_t_8);
   20902           0 :   __Pyx_XDECREF(__pyx_t_11);
   20903           0 :   __Pyx_XDECREF(__pyx_t_12);
   20904           0 :   __Pyx_XDECREF(__pyx_t_13);
   20905           0 :   { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
   20906           0 :     __Pyx_PyThreadState_declare
   20907           0 :     __Pyx_PyThreadState_assign
   20908           0 :     __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
   20909           0 :     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a.rcbuffer->pybuffer);
   20910           0 :     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lu.rcbuffer->pybuffer);
   20911           0 :   __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
   20912           0 :   __Pyx_WriteUnraisable("scipy.linalg._decomp_lu_cython.lu_decompose", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
   20913           0 :   goto __pyx_L2;
   20914           6 :   __pyx_L0:;
   20915           6 :   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a.rcbuffer->pybuffer);
   20916           6 :   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lu.rcbuffer->pybuffer);
   20917           6 :   __pyx_L2:;
   20918           6 :   __Pyx_XDECREF(__pyx_v_b);
   20919           6 :   __Pyx_RefNannyFinishContext();
   20920           6 : }
   20921             : 
   20922          95 : static void __pyx_fuse_1__pyx_f_5scipy_6linalg_17_decomp_lu_cython_lu_decompose(PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_lu, __Pyx_memviewslice __pyx_v_perm, int __pyx_v_permute_l) {
   20923          95 :   int __pyx_v_m;
   20924          95 :   int __pyx_v_n;
   20925          95 :   int __pyx_v_mn;
   20926          95 :   npy_intp __pyx_v_dims[2];
   20927          95 :   int __pyx_v_info;
   20928          95 :   int __pyx_v_ind1;
   20929          95 :   int __pyx_v_ind2;
   20930          95 :   int __pyx_v_tmp_int;
   20931          95 :   __pyx_t_5numpy_float64_t *__pyx_v_aa;
   20932          95 :   __pyx_t_5numpy_float64_t *__pyx_v_bb;
   20933          95 :   int *__pyx_v_ipiv;
   20934          95 :   PyObject *__pyx_v_b = NULL;
   20935          95 :   __Pyx_LocalBuf_ND __pyx_pybuffernd_a;
   20936          95 :   __Pyx_Buffer __pyx_pybuffer_a;
   20937          95 :   __Pyx_LocalBuf_ND __pyx_pybuffernd_lu;
   20938          95 :   __Pyx_Buffer __pyx_pybuffer_lu;
   20939             :   __Pyx_RefNannyDeclarations
   20940          95 :   int __pyx_t_1;
   20941          95 :   int __pyx_t_2;
   20942          95 :   int __pyx_t_3;
   20943          95 :   int __pyx_t_4;
   20944          95 :   PyObject *__pyx_t_5 = NULL;
   20945          95 :   Py_ssize_t __pyx_t_6;
   20946          95 :   Py_UCS4 __pyx_t_7;
   20947          95 :   PyObject *__pyx_t_8 = NULL;
   20948          95 :   Py_ssize_t __pyx_t_9;
   20949          95 :   Py_ssize_t __pyx_t_10;
   20950          95 :   PyObject *__pyx_t_11 = NULL;
   20951          95 :   PyObject *__pyx_t_12 = NULL;
   20952          95 :   PyObject *__pyx_t_13 = NULL;
   20953          95 :   long __pyx_t_14;
   20954          95 :   long __pyx_t_15;
   20955          95 :   int __pyx_t_16;
   20956          95 :   int __pyx_lineno = 0;
   20957          95 :   const char *__pyx_filename = NULL;
   20958          95 :   int __pyx_clineno = 0;
   20959          95 :   __Pyx_RefNannySetupContext("__pyx_fuse_1lu_decompose", 1);
   20960          95 :   __pyx_pybuffer_a.pybuffer.buf = NULL;
   20961          95 :   __pyx_pybuffer_a.refcount = 0;
   20962          95 :   __pyx_pybuffernd_a.data = NULL;
   20963          95 :   __pyx_pybuffernd_a.rcbuffer = &__pyx_pybuffer_a;
   20964          95 :   __pyx_pybuffer_lu.pybuffer.buf = NULL;
   20965          95 :   __pyx_pybuffer_lu.refcount = 0;
   20966          95 :   __pyx_pybuffernd_lu.data = NULL;
   20967          95 :   __pyx_pybuffernd_lu.rcbuffer = &__pyx_pybuffer_lu;
   20968             :   {
   20969          95 :     __Pyx_BufFmt_StackElem __pyx_stack[1];
   20970          95 :     if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a.rcbuffer->pybuffer, (PyObject*)__pyx_v_a, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 22, __pyx_L1_error)
   20971             :   }
   20972          95 :   __pyx_pybuffernd_a.diminfo[0].strides = __pyx_pybuffernd_a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a.diminfo[0].shape = __pyx_pybuffernd_a.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_a.diminfo[1].strides = __pyx_pybuffernd_a.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_a.diminfo[1].shape = __pyx_pybuffernd_a.rcbuffer->pybuffer.shape[1];
   20973             :   {
   20974          95 :     __Pyx_BufFmt_StackElem __pyx_stack[1];
   20975          95 :     if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lu.rcbuffer->pybuffer, (PyObject*)__pyx_v_lu, &__Pyx_TypeInfo_nn___pyx_t_5numpy_float64_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 22, __pyx_L1_error)
   20976             :   }
   20977          95 :   __pyx_pybuffernd_lu.diminfo[0].strides = __pyx_pybuffernd_lu.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lu.diminfo[0].shape = __pyx_pybuffernd_lu.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_lu.diminfo[1].strides = __pyx_pybuffernd_lu.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_lu.diminfo[1].shape = __pyx_pybuffernd_lu.rcbuffer->pybuffer.shape[1];
   20978             : 
   20979             :   /* "scipy/linalg/_decomp_lu_cython.pyx":50
   20980             :  * 
   20981             :  *     """
   20982             :  *     cdef int m = a.shape[0], n = a.shape[1], mn = min(m, n)             # <<<<<<<<<<<<<<
   20983             :  *     cdef cnp.npy_intp dims[2]
   20984             :  *     cdef int info = 0, ind1, ind2, tmp_int
   20985             :  */
   20986          95 :   __pyx_v_m = (__pyx_f_5numpy_7ndarray_5shape_shape(((PyArrayObject *)__pyx_v_a))[0]);
   20987          95 :   __pyx_v_n = (__pyx_f_5numpy_7ndarray_5shape_shape(((PyArrayObject *)__pyx_v_a))[1]);
   20988          95 :   __pyx_t_1 = __pyx_v_n;
   20989          95 :   __pyx_t_2 = __pyx_v_m;
   20990          95 :   __pyx_t_4 = (__pyx_t_1 < __pyx_t_2);
   20991          95 :   if (__pyx_t_4) {
   20992             :     __pyx_t_3 = __pyx_t_1;
   20993             :   } else {
   20994             :     __pyx_t_3 = __pyx_t_2;
   20995             :   }
   20996          95 :   __pyx_v_mn = __pyx_t_3;
   20997             : 
   20998             :   /* "scipy/linalg/_decomp_lu_cython.pyx":52
   20999             :  *     cdef int m = a.shape[0], n = a.shape[1], mn = min(m, n)
   21000             :  *     cdef cnp.npy_intp dims[2]
   21001             :  *     cdef int info = 0, ind1, ind2, tmp_int             # <<<<<<<<<<<<<<
   21002             :  *     cdef lapack_t *aa = <lapack_t *>cnp.PyArray_DATA(a)
   21003             :  *     cdef lapack_t *bb
   21004             :  */
   21005          95 :   __pyx_v_info = 0;
   21006             : 
   21007             :   /* "scipy/linalg/_decomp_lu_cython.pyx":53
   21008             :  *     cdef cnp.npy_intp dims[2]
   21009             :  *     cdef int info = 0, ind1, ind2, tmp_int
   21010             :  *     cdef lapack_t *aa = <lapack_t *>cnp.PyArray_DATA(a)             # <<<<<<<<<<<<<<
   21011             :  *     cdef lapack_t *bb
   21012             :  *     cdef int *ipiv = <int*>PyMem_Malloc(m * sizeof(int))
   21013             :  */
   21014          95 :   __pyx_v_aa = ((__pyx_t_5numpy_float64_t *)PyArray_DATA(((PyArrayObject *)__pyx_v_a)));
   21015             : 
   21016             :   /* "scipy/linalg/_decomp_lu_cython.pyx":55
   21017             :  *     cdef lapack_t *aa = <lapack_t *>cnp.PyArray_DATA(a)
   21018             :  *     cdef lapack_t *bb
   21019             :  *     cdef int *ipiv = <int*>PyMem_Malloc(m * sizeof(int))             # <<<<<<<<<<<<<<
   21020             :  *     if not ipiv:
   21021             :  *         raise MemoryError('scipy.linalg.lu failed to allocate '
   21022             :  */
   21023          95 :   __pyx_v_ipiv = ((int *)PyMem_Malloc((__pyx_v_m * (sizeof(int)))));
   21024             : 
   21025             :   /* "scipy/linalg/_decomp_lu_cython.pyx":56
   21026             :  *     cdef lapack_t *bb
   21027             :  *     cdef int *ipiv = <int*>PyMem_Malloc(m * sizeof(int))
   21028             :  *     if not ipiv:             # <<<<<<<<<<<<<<
   21029             :  *         raise MemoryError('scipy.linalg.lu failed to allocate '
   21030             :  *                           'required memory.')
   21031             :  */
   21032          95 :   __pyx_t_4 = (!(__pyx_v_ipiv != 0));
   21033          95 :   if (unlikely(__pyx_t_4)) {
   21034             : 
   21035             :     /* "scipy/linalg/_decomp_lu_cython.pyx":57
   21036             :  *     cdef int *ipiv = <int*>PyMem_Malloc(m * sizeof(int))
   21037             :  *     if not ipiv:
   21038             :  *         raise MemoryError('scipy.linalg.lu failed to allocate '             # <<<<<<<<<<<<<<
   21039             :  *                           'required memory.')
   21040             :  *     dims[0] = m
   21041             :  */
   21042           0 :     __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 57, __pyx_L1_error)
   21043           0 :     __Pyx_GOTREF(__pyx_t_5);
   21044           0 :     __Pyx_Raise(__pyx_t_5, 0, 0, 0);
   21045           0 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   21046           0 :     __PYX_ERR(0, 57, __pyx_L1_error)
   21047             : 
   21048             :     /* "scipy/linalg/_decomp_lu_cython.pyx":56
   21049             :  *     cdef lapack_t *bb
   21050             :  *     cdef int *ipiv = <int*>PyMem_Malloc(m * sizeof(int))
   21051             :  *     if not ipiv:             # <<<<<<<<<<<<<<
   21052             :  *         raise MemoryError('scipy.linalg.lu failed to allocate '
   21053             :  *                           'required memory.')
   21054             :  */
   21055             :   }
   21056             : 
   21057             :   /* "scipy/linalg/_decomp_lu_cython.pyx":59
   21058             :  *         raise MemoryError('scipy.linalg.lu failed to allocate '
   21059             :  *                           'required memory.')
   21060             :  *     dims[0] = m             # <<<<<<<<<<<<<<
   21061             :  *     dims[1] = n
   21062             :  * 
   21063             :  */
   21064          95 :   (__pyx_v_dims[0]) = __pyx_v_m;
   21065             : 
   21066             :   /* "scipy/linalg/_decomp_lu_cython.pyx":60
   21067             :  *                           'required memory.')
   21068             :  *     dims[0] = m
   21069             :  *     dims[1] = n             # <<<<<<<<<<<<<<
   21070             :  * 
   21071             :  *     if lapack_t is cnp.float32_t:
   21072             :  */
   21073          95 :   (__pyx_v_dims[1]) = __pyx_v_n;
   21074             : 
   21075             :   /* "scipy/linalg/_decomp_lu_cython.pyx":68
   21076             :  *         sgetrf(&m, &n, bb, &m, ipiv, &info)
   21077             :  *     elif lapack_t is cnp.float64_t:
   21078             :  *         b = cnp.PyArray_SimpleNew(2, dims, cnp.NPY_FLOAT64)             # <<<<<<<<<<<<<<
   21079             :  *         bb = <cnp.float64_t *>cnp.PyArray_DATA(b)
   21080             :  *         swap_c_and_f_layout(aa, bb, m, n)
   21081             :  */
   21082          95 :   __pyx_t_5 = PyArray_SimpleNew(2, __pyx_v_dims, NPY_FLOAT64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 68, __pyx_L1_error)
   21083          95 :   __Pyx_GOTREF(__pyx_t_5);
   21084          95 :   __pyx_v_b = __pyx_t_5;
   21085          95 :   __pyx_t_5 = 0;
   21086             : 
   21087             :   /* "scipy/linalg/_decomp_lu_cython.pyx":69
   21088             :  *     elif lapack_t is cnp.float64_t:
   21089             :  *         b = cnp.PyArray_SimpleNew(2, dims, cnp.NPY_FLOAT64)
   21090             :  *         bb = <cnp.float64_t *>cnp.PyArray_DATA(b)             # <<<<<<<<<<<<<<
   21091             :  *         swap_c_and_f_layout(aa, bb, m, n)
   21092             :  *         dgetrf(&m, &n, bb, &m, ipiv, &info)
   21093             :  */
   21094          95 :   if (!(likely(((__pyx_v_b) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_b, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 69, __pyx_L1_error)
   21095          95 :   __pyx_v_bb = ((__pyx_t_5numpy_float64_t *)PyArray_DATA(((PyArrayObject *)__pyx_v_b)));
   21096             : 
   21097             :   /* "scipy/linalg/_decomp_lu_cython.pyx":70
   21098             :  *         b = cnp.PyArray_SimpleNew(2, dims, cnp.NPY_FLOAT64)
   21099             :  *         bb = <cnp.float64_t *>cnp.PyArray_DATA(b)
   21100             :  *         swap_c_and_f_layout(aa, bb, m, n)             # <<<<<<<<<<<<<<
   21101             :  *         dgetrf(&m, &n, bb, &m, ipiv, &info)
   21102             :  *     elif lapack_t is cnp.complex64_t:
   21103             :  */
   21104          95 :   __pyx_fuse_1__pyx_f_5scipy_6linalg_23_cythonized_array_utils_swap_c_and_f_layout(__pyx_v_aa, __pyx_v_bb, __pyx_v_m, __pyx_v_n);
   21105             : 
   21106             :   /* "scipy/linalg/_decomp_lu_cython.pyx":71
   21107             :  *         bb = <cnp.float64_t *>cnp.PyArray_DATA(b)
   21108             :  *         swap_c_and_f_layout(aa, bb, m, n)
   21109             :  *         dgetrf(&m, &n, bb, &m, ipiv, &info)             # <<<<<<<<<<<<<<
   21110             :  *     elif lapack_t is cnp.complex64_t:
   21111             :  *         b = cnp.PyArray_SimpleNew(2, dims, cnp.NPY_COMPLEX64)
   21112             :  */
   21113          95 :   __pyx_f_5scipy_6linalg_13cython_lapack_dgetrf((&__pyx_v_m), (&__pyx_v_n), __pyx_v_bb, (&__pyx_v_m), __pyx_v_ipiv, (&__pyx_v_info));
   21114             : 
   21115             :   /* "scipy/linalg/_decomp_lu_cython.pyx":83
   21116             :  *         zgetrf(&m, &n, bb, &m, ipiv, &info)
   21117             :  * 
   21118             :  *     if info < 0:             # <<<<<<<<<<<<<<
   21119             :  *         raise ValueError('scipy.linalg.lu has encountered an internal'
   21120             :  *                          ' error in ?getrf routine with invalid value'
   21121             :  */
   21122          95 :   __pyx_t_4 = (__pyx_v_info < 0);
   21123          95 :   if (unlikely(__pyx_t_4)) {
   21124             : 
   21125             :     /* "scipy/linalg/_decomp_lu_cython.pyx":84
   21126             :  * 
   21127             :  *     if info < 0:
   21128             :  *         raise ValueError('scipy.linalg.lu has encountered an internal'             # <<<<<<<<<<<<<<
   21129             :  *                          ' error in ?getrf routine with invalid value'
   21130             :  *                          f' at {-info}-th parameter.')
   21131             :  */
   21132           0 :     __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 84, __pyx_L1_error)
   21133           0 :     __Pyx_GOTREF(__pyx_t_5);
   21134           0 :     __pyx_t_6 = 0;
   21135           0 :     __pyx_t_7 = 127;
   21136           0 :     __Pyx_INCREF(__pyx_kp_u_scipy_linalg_lu_has_encountered);
   21137           0 :     __pyx_t_6 += 90;
   21138           0 :     __Pyx_GIVEREF(__pyx_kp_u_scipy_linalg_lu_has_encountered);
   21139           0 :     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_scipy_linalg_lu_has_encountered);
   21140             : 
   21141             :     /* "scipy/linalg/_decomp_lu_cython.pyx":86
   21142             :  *         raise ValueError('scipy.linalg.lu has encountered an internal'
   21143             :  *                          ' error in ?getrf routine with invalid value'
   21144             :  *                          f' at {-info}-th parameter.')             # <<<<<<<<<<<<<<
   21145             :  * 
   21146             :  *     # Get the result back to C-contiguous layout and clean-up
   21147             :  */
   21148           0 :     __pyx_t_8 = __Pyx_PyUnicode_From_int((-__pyx_v_info), 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 86, __pyx_L1_error)
   21149           0 :     __Pyx_GOTREF(__pyx_t_8);
   21150           0 :     __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
   21151           0 :     __Pyx_GIVEREF(__pyx_t_8);
   21152           0 :     PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_8);
   21153           0 :     __pyx_t_8 = 0;
   21154           0 :     __Pyx_INCREF(__pyx_kp_u_th_parameter);
   21155           0 :     __pyx_t_6 += 14;
   21156           0 :     __Pyx_GIVEREF(__pyx_kp_u_th_parameter);
   21157           0 :     PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_th_parameter);
   21158             : 
   21159             :     /* "scipy/linalg/_decomp_lu_cython.pyx":84
   21160             :  * 
   21161             :  *     if info < 0:
   21162             :  *         raise ValueError('scipy.linalg.lu has encountered an internal'             # <<<<<<<<<<<<<<
   21163             :  *                          ' error in ?getrf routine with invalid value'
   21164             :  *                          f' at {-info}-th parameter.')
   21165             :  */
   21166           0 :     __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 84, __pyx_L1_error)
   21167           0 :     __Pyx_GOTREF(__pyx_t_8);
   21168           0 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   21169           0 :     __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 84, __pyx_L1_error)
   21170           0 :     __Pyx_GOTREF(__pyx_t_5);
   21171           0 :     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   21172           0 :     __Pyx_Raise(__pyx_t_5, 0, 0, 0);
   21173           0 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   21174           0 :     __PYX_ERR(0, 84, __pyx_L1_error)
   21175             : 
   21176             :     /* "scipy/linalg/_decomp_lu_cython.pyx":83
   21177             :  *         zgetrf(&m, &n, bb, &m, ipiv, &info)
   21178             :  * 
   21179             :  *     if info < 0:             # <<<<<<<<<<<<<<
   21180             :  *         raise ValueError('scipy.linalg.lu has encountered an internal'
   21181             :  *                          ' error in ?getrf routine with invalid value'
   21182             :  */
   21183             :   }
   21184             : 
   21185             :   /* "scipy/linalg/_decomp_lu_cython.pyx":89
   21186             :  * 
   21187             :  *     # Get the result back to C-contiguous layout and clean-up
   21188             :  *     swap_c_and_f_layout(bb, aa, n, m)             # <<<<<<<<<<<<<<
   21189             :  * 
   21190             :  *     # Convert swaps on A to permutations on L since A = P @ L @ U
   21191             :  */
   21192          95 :   __pyx_fuse_1__pyx_f_5scipy_6linalg_23_cythonized_array_utils_swap_c_and_f_layout(__pyx_v_bb, __pyx_v_aa, __pyx_v_n, __pyx_v_m);
   21193             : 
   21194             :   /* "scipy/linalg/_decomp_lu_cython.pyx":92
   21195             :  * 
   21196             :  *     # Convert swaps on A to permutations on L since A = P @ L @ U
   21197             :  *     try:             # <<<<<<<<<<<<<<
   21198             :  *         # Basically we are following the cycles in ipiv
   21199             :  *         # and swapping an "np.arange" array for the inverse perm.
   21200             :  */
   21201             :   /*try:*/ {
   21202             : 
   21203             :     /* "scipy/linalg/_decomp_lu_cython.pyx":96
   21204             :  *         # and swapping an "np.arange" array for the inverse perm.
   21205             :  *         # Initialize perm
   21206             :  *         for ind1 in range(m): perm[ind1] = ind1             # <<<<<<<<<<<<<<
   21207             :  *         for ind1 in range(mn):
   21208             :  *             tmp_int = perm[ipiv[ind1]-1]
   21209             :  */
   21210          95 :     __pyx_t_3 = __pyx_v_m;
   21211          95 :     __pyx_t_1 = __pyx_t_3;
   21212        1078 :     for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   21213         983 :       __pyx_v_ind1 = __pyx_t_2;
   21214         983 :       __pyx_t_9 = __pyx_v_ind1;
   21215         983 :       *((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) )) = __pyx_v_ind1;
   21216             :     }
   21217             : 
   21218             :     /* "scipy/linalg/_decomp_lu_cython.pyx":97
   21219             :  *         # Initialize perm
   21220             :  *         for ind1 in range(m): perm[ind1] = ind1
   21221             :  *         for ind1 in range(mn):             # <<<<<<<<<<<<<<
   21222             :  *             tmp_int = perm[ipiv[ind1]-1]
   21223             :  *             perm[ipiv[ind1]-1] = perm[ind1]
   21224             :  */
   21225         895 :     __pyx_t_3 = __pyx_v_mn;
   21226         895 :     __pyx_t_1 = __pyx_t_3;
   21227         895 :     for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   21228         800 :       __pyx_v_ind1 = __pyx_t_2;
   21229             : 
   21230             :       /* "scipy/linalg/_decomp_lu_cython.pyx":98
   21231             :  *         for ind1 in range(m): perm[ind1] = ind1
   21232             :  *         for ind1 in range(mn):
   21233             :  *             tmp_int = perm[ipiv[ind1]-1]             # <<<<<<<<<<<<<<
   21234             :  *             perm[ipiv[ind1]-1] = perm[ind1]
   21235             :  *             perm[ind1] = tmp_int
   21236             :  */
   21237         800 :       __pyx_t_9 = ((__pyx_v_ipiv[__pyx_v_ind1]) - 1);
   21238         800 :       __pyx_v_tmp_int = (*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) )));
   21239             : 
   21240             :       /* "scipy/linalg/_decomp_lu_cython.pyx":99
   21241             :  *         for ind1 in range(mn):
   21242             :  *             tmp_int = perm[ipiv[ind1]-1]
   21243             :  *             perm[ipiv[ind1]-1] = perm[ind1]             # <<<<<<<<<<<<<<
   21244             :  *             perm[ind1] = tmp_int
   21245             :  * 
   21246             :  */
   21247         800 :       __pyx_t_9 = __pyx_v_ind1;
   21248         800 :       __pyx_t_10 = ((__pyx_v_ipiv[__pyx_v_ind1]) - 1);
   21249         800 :       *((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_10)) )) = (*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) )));
   21250             : 
   21251             :       /* "scipy/linalg/_decomp_lu_cython.pyx":100
   21252             :  *             tmp_int = perm[ipiv[ind1]-1]
   21253             :  *             perm[ipiv[ind1]-1] = perm[ind1]
   21254             :  *             perm[ind1] = tmp_int             # <<<<<<<<<<<<<<
   21255             :  * 
   21256             :  *         # convert iperm to perm into ipiv and store back into perm
   21257             :  */
   21258         800 :       __pyx_t_9 = __pyx_v_ind1;
   21259         800 :       *((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) )) = __pyx_v_tmp_int;
   21260             :     }
   21261             : 
   21262             :     /* "scipy/linalg/_decomp_lu_cython.pyx":104
   21263             :  *         # convert iperm to perm into ipiv and store back into perm
   21264             :  *         # as final. Solution without argsort : ipiv[perm] = np.arange(m)
   21265             :  *         for ind1 in range(m):             # <<<<<<<<<<<<<<
   21266             :  *             ipiv[perm[ind1]] = ind1
   21267             :  *         for ind1 in range(m):
   21268             :  */
   21269        1078 :     __pyx_t_3 = __pyx_v_m;
   21270        1078 :     __pyx_t_1 = __pyx_t_3;
   21271        1078 :     for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   21272         983 :       __pyx_v_ind1 = __pyx_t_2;
   21273             : 
   21274             :       /* "scipy/linalg/_decomp_lu_cython.pyx":105
   21275             :  *         # as final. Solution without argsort : ipiv[perm] = np.arange(m)
   21276             :  *         for ind1 in range(m):
   21277             :  *             ipiv[perm[ind1]] = ind1             # <<<<<<<<<<<<<<
   21278             :  *         for ind1 in range(m):
   21279             :  *             perm[ind1] = ipiv[ind1]
   21280             :  */
   21281         983 :       __pyx_t_9 = __pyx_v_ind1;
   21282         983 :       (__pyx_v_ipiv[(*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) )))]) = __pyx_v_ind1;
   21283             :     }
   21284             : 
   21285             :     /* "scipy/linalg/_decomp_lu_cython.pyx":106
   21286             :  *         for ind1 in range(m):
   21287             :  *             ipiv[perm[ind1]] = ind1
   21288             :  *         for ind1 in range(m):             # <<<<<<<<<<<<<<
   21289             :  *             perm[ind1] = ipiv[ind1]
   21290             :  * 
   21291             :  */
   21292          95 :     __pyx_t_3 = __pyx_v_m;
   21293          95 :     __pyx_t_1 = __pyx_t_3;
   21294        1078 :     for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   21295         983 :       __pyx_v_ind1 = __pyx_t_2;
   21296             : 
   21297             :       /* "scipy/linalg/_decomp_lu_cython.pyx":107
   21298             :  *             ipiv[perm[ind1]] = ind1
   21299             :  *         for ind1 in range(m):
   21300             :  *             perm[ind1] = ipiv[ind1]             # <<<<<<<<<<<<<<
   21301             :  * 
   21302             :  *     finally:
   21303             :  */
   21304         983 :       __pyx_t_9 = __pyx_v_ind1;
   21305         983 :       *((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) )) = (__pyx_v_ipiv[__pyx_v_ind1]);
   21306             :     }
   21307             :   }
   21308             : 
   21309             :   /* "scipy/linalg/_decomp_lu_cython.pyx":110
   21310             :  * 
   21311             :  *     finally:
   21312             :  *         PyMem_Free(ipiv)             # <<<<<<<<<<<<<<
   21313             :  * 
   21314             :  *     # Separation of L and U parts
   21315             :  */
   21316             :   /*finally:*/ {
   21317             :     /*normal exit:*/{
   21318          95 :       PyMem_Free(__pyx_v_ipiv);
   21319          95 :       goto __pyx_L7;
   21320             :     }
   21321          95 :     __pyx_L7:;
   21322             :   }
   21323             : 
   21324             :   /* "scipy/linalg/_decomp_lu_cython.pyx":114
   21325             :  *     # Separation of L and U parts
   21326             :  * 
   21327             :  *     if m > n:  # tall, "a" holds bigger L             # <<<<<<<<<<<<<<
   21328             :  *         # Extract upper right rectangle to lu
   21329             :  *         for ind1 in range(mn):  # rows
   21330             :  */
   21331          95 :   __pyx_t_4 = (__pyx_v_m > __pyx_v_n);
   21332          95 :   if (__pyx_t_4) {
   21333             : 
   21334             :     /* "scipy/linalg/_decomp_lu_cython.pyx":116
   21335             :  *     if m > n:  # tall, "a" holds bigger L
   21336             :  *         # Extract upper right rectangle to lu
   21337             :  *         for ind1 in range(mn):  # rows             # <<<<<<<<<<<<<<
   21338             :  *             lu[ind1, ind1:mn] = a[ind1, ind1:mn]
   21339             :  * 
   21340             :  */
   21341         140 :     __pyx_t_3 = __pyx_v_mn;
   21342         140 :     __pyx_t_1 = __pyx_t_3;
   21343         140 :     for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   21344         117 :       __pyx_v_ind1 = __pyx_t_2;
   21345             : 
   21346             :       /* "scipy/linalg/_decomp_lu_cython.pyx":117
   21347             :  *         # Extract upper right rectangle to lu
   21348             :  *         for ind1 in range(mn):  # rows
   21349             :  *             lu[ind1, ind1:mn] = a[ind1, ind1:mn]             # <<<<<<<<<<<<<<
   21350             :  * 
   21351             :  *         for ind1 in range(mn):
   21352             :  */
   21353         117 :       __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 117, __pyx_L1_error)
   21354         117 :       __Pyx_GOTREF(__pyx_t_5);
   21355         117 :       __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 117, __pyx_L1_error)
   21356         117 :       __Pyx_GOTREF(__pyx_t_8);
   21357         117 :       __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_mn); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 117, __pyx_L1_error)
   21358         117 :       __Pyx_GOTREF(__pyx_t_11);
   21359         117 :       __pyx_t_12 = PySlice_New(__pyx_t_8, __pyx_t_11, Py_None); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 117, __pyx_L1_error)
   21360         117 :       __Pyx_GOTREF(__pyx_t_12);
   21361         117 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   21362         117 :       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   21363         117 :       __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 117, __pyx_L1_error)
   21364         117 :       __Pyx_GOTREF(__pyx_t_11);
   21365         117 :       __Pyx_GIVEREF(__pyx_t_5);
   21366         117 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_5)) __PYX_ERR(0, 117, __pyx_L1_error);
   21367         117 :       __Pyx_GIVEREF(__pyx_t_12);
   21368         117 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_12)) __PYX_ERR(0, 117, __pyx_L1_error);
   21369         117 :       __pyx_t_5 = 0;
   21370         117 :       __pyx_t_12 = 0;
   21371         117 :       __pyx_t_12 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_a), __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 117, __pyx_L1_error)
   21372         117 :       __Pyx_GOTREF(__pyx_t_12);
   21373         117 :       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   21374         117 :       __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 117, __pyx_L1_error)
   21375         117 :       __Pyx_GOTREF(__pyx_t_11);
   21376         117 :       __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 117, __pyx_L1_error)
   21377         117 :       __Pyx_GOTREF(__pyx_t_5);
   21378         117 :       __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_mn); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 117, __pyx_L1_error)
   21379         117 :       __Pyx_GOTREF(__pyx_t_8);
   21380         117 :       __pyx_t_13 = PySlice_New(__pyx_t_5, __pyx_t_8, Py_None); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 117, __pyx_L1_error)
   21381         117 :       __Pyx_GOTREF(__pyx_t_13);
   21382         117 :       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   21383         117 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   21384         117 :       __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 117, __pyx_L1_error)
   21385         117 :       __Pyx_GOTREF(__pyx_t_8);
   21386         117 :       __Pyx_GIVEREF(__pyx_t_11);
   21387         117 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_11)) __PYX_ERR(0, 117, __pyx_L1_error);
   21388         117 :       __Pyx_GIVEREF(__pyx_t_13);
   21389         117 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_13)) __PYX_ERR(0, 117, __pyx_L1_error);
   21390         117 :       __pyx_t_11 = 0;
   21391         117 :       __pyx_t_13 = 0;
   21392         117 :       if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_lu), __pyx_t_8, __pyx_t_12) < 0))) __PYX_ERR(0, 117, __pyx_L1_error)
   21393         117 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   21394         234 :       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
   21395             :     }
   21396             : 
   21397             :     /* "scipy/linalg/_decomp_lu_cython.pyx":119
   21398             :  *             lu[ind1, ind1:mn] = a[ind1, ind1:mn]
   21399             :  * 
   21400             :  *         for ind1 in range(mn):             # <<<<<<<<<<<<<<
   21401             :  *             a[ind1, ind1] = 1
   21402             :  *             a[ind1, ind1+1:mn] = 0
   21403             :  */
   21404         140 :     __pyx_t_3 = __pyx_v_mn;
   21405         140 :     __pyx_t_1 = __pyx_t_3;
   21406         140 :     for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   21407         117 :       __pyx_v_ind1 = __pyx_t_2;
   21408             : 
   21409             :       /* "scipy/linalg/_decomp_lu_cython.pyx":120
   21410             :  * 
   21411             :  *         for ind1 in range(mn):
   21412             :  *             a[ind1, ind1] = 1             # <<<<<<<<<<<<<<
   21413             :  *             a[ind1, ind1+1:mn] = 0
   21414             :  * 
   21415             :  */
   21416         117 :       __pyx_t_9 = __pyx_v_ind1;
   21417         117 :       __pyx_t_10 = __pyx_v_ind1;
   21418         117 :       *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_a.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_a.diminfo[1].strides) = 1.0;
   21419             : 
   21420             :       /* "scipy/linalg/_decomp_lu_cython.pyx":121
   21421             :  *         for ind1 in range(mn):
   21422             :  *             a[ind1, ind1] = 1
   21423             :  *             a[ind1, ind1+1:mn] = 0             # <<<<<<<<<<<<<<
   21424             :  * 
   21425             :  *     else:  # square or fat, "a" holds bigger U
   21426             :  */
   21427         117 :       __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 121, __pyx_L1_error)
   21428         117 :       __Pyx_GOTREF(__pyx_t_12);
   21429         117 :       __pyx_t_8 = __Pyx_PyInt_From_long((__pyx_v_ind1 + 1)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 121, __pyx_L1_error)
   21430         117 :       __Pyx_GOTREF(__pyx_t_8);
   21431         117 :       __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_mn); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 121, __pyx_L1_error)
   21432         117 :       __Pyx_GOTREF(__pyx_t_13);
   21433         117 :       __pyx_t_11 = PySlice_New(__pyx_t_8, __pyx_t_13, Py_None); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 121, __pyx_L1_error)
   21434         117 :       __Pyx_GOTREF(__pyx_t_11);
   21435         117 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   21436         117 :       __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   21437         117 :       __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 121, __pyx_L1_error)
   21438         117 :       __Pyx_GOTREF(__pyx_t_13);
   21439         117 :       __Pyx_GIVEREF(__pyx_t_12);
   21440         117 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12)) __PYX_ERR(0, 121, __pyx_L1_error);
   21441         117 :       __Pyx_GIVEREF(__pyx_t_11);
   21442         117 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_11)) __PYX_ERR(0, 121, __pyx_L1_error);
   21443         117 :       __pyx_t_12 = 0;
   21444         117 :       __pyx_t_11 = 0;
   21445         117 :       if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_a), __pyx_t_13, __pyx_int_0) < 0))) __PYX_ERR(0, 121, __pyx_L1_error)
   21446         257 :       __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   21447             :     }
   21448             : 
   21449             :     /* "scipy/linalg/_decomp_lu_cython.pyx":114
   21450             :  *     # Separation of L and U parts
   21451             :  * 
   21452             :  *     if m > n:  # tall, "a" holds bigger L             # <<<<<<<<<<<<<<
   21453             :  *         # Extract upper right rectangle to lu
   21454             :  *         for ind1 in range(mn):  # rows
   21455             :  */
   21456          23 :     goto __pyx_L16;
   21457             :   }
   21458             : 
   21459             :   /* "scipy/linalg/_decomp_lu_cython.pyx":125
   21460             :  *     else:  # square or fat, "a" holds bigger U
   21461             :  * 
   21462             :  *         lu[0, 0] = 1             # <<<<<<<<<<<<<<
   21463             :  *         for ind1 in range(1, mn):  # rows
   21464             :  *             lu[ind1, :ind1] = a[ind1, :ind1]
   21465             :  */
   21466             :   /*else*/ {
   21467          72 :     __pyx_t_10 = 0;
   21468          72 :     __pyx_t_9 = 0;
   21469          72 :     *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_lu.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_lu.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_lu.diminfo[1].strides) = 1.0;
   21470             : 
   21471             :     /* "scipy/linalg/_decomp_lu_cython.pyx":126
   21472             :  * 
   21473             :  *         lu[0, 0] = 1
   21474             :  *         for ind1 in range(1, mn):  # rows             # <<<<<<<<<<<<<<
   21475             :  *             lu[ind1, :ind1] = a[ind1, :ind1]
   21476             :  *             lu[ind1, ind1] = 1
   21477             :  */
   21478          72 :     __pyx_t_3 = __pyx_v_mn;
   21479          72 :     __pyx_t_1 = __pyx_t_3;
   21480         683 :     for (__pyx_t_2 = 1; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   21481         611 :       __pyx_v_ind1 = __pyx_t_2;
   21482             : 
   21483             :       /* "scipy/linalg/_decomp_lu_cython.pyx":127
   21484             :  *         lu[0, 0] = 1
   21485             :  *         for ind1 in range(1, mn):  # rows
   21486             :  *             lu[ind1, :ind1] = a[ind1, :ind1]             # <<<<<<<<<<<<<<
   21487             :  *             lu[ind1, ind1] = 1
   21488             :  * 
   21489             :  */
   21490         611 :       __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 127, __pyx_L1_error)
   21491         611 :       __Pyx_GOTREF(__pyx_t_13);
   21492         611 :       __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 127, __pyx_L1_error)
   21493         611 :       __Pyx_GOTREF(__pyx_t_11);
   21494         611 :       __pyx_t_12 = PySlice_New(Py_None, __pyx_t_11, Py_None); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 127, __pyx_L1_error)
   21495         611 :       __Pyx_GOTREF(__pyx_t_12);
   21496         611 :       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   21497         611 :       __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 127, __pyx_L1_error)
   21498         611 :       __Pyx_GOTREF(__pyx_t_11);
   21499         611 :       __Pyx_GIVEREF(__pyx_t_13);
   21500         611 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13)) __PYX_ERR(0, 127, __pyx_L1_error);
   21501         611 :       __Pyx_GIVEREF(__pyx_t_12);
   21502         611 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_12)) __PYX_ERR(0, 127, __pyx_L1_error);
   21503         611 :       __pyx_t_13 = 0;
   21504         611 :       __pyx_t_12 = 0;
   21505         611 :       __pyx_t_12 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_a), __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 127, __pyx_L1_error)
   21506         611 :       __Pyx_GOTREF(__pyx_t_12);
   21507         611 :       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   21508         611 :       __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 127, __pyx_L1_error)
   21509         611 :       __Pyx_GOTREF(__pyx_t_11);
   21510         611 :       __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 127, __pyx_L1_error)
   21511         611 :       __Pyx_GOTREF(__pyx_t_13);
   21512         611 :       __pyx_t_8 = PySlice_New(Py_None, __pyx_t_13, Py_None); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 127, __pyx_L1_error)
   21513         611 :       __Pyx_GOTREF(__pyx_t_8);
   21514         611 :       __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   21515         611 :       __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 127, __pyx_L1_error)
   21516         611 :       __Pyx_GOTREF(__pyx_t_13);
   21517         611 :       __Pyx_GIVEREF(__pyx_t_11);
   21518         611 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_11)) __PYX_ERR(0, 127, __pyx_L1_error);
   21519         611 :       __Pyx_GIVEREF(__pyx_t_8);
   21520         611 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_8)) __PYX_ERR(0, 127, __pyx_L1_error);
   21521         611 :       __pyx_t_11 = 0;
   21522         611 :       __pyx_t_8 = 0;
   21523         611 :       if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_lu), __pyx_t_13, __pyx_t_12) < 0))) __PYX_ERR(0, 127, __pyx_L1_error)
   21524         611 :       __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   21525         611 :       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
   21526             : 
   21527             :       /* "scipy/linalg/_decomp_lu_cython.pyx":128
   21528             :  *         for ind1 in range(1, mn):  # rows
   21529             :  *             lu[ind1, :ind1] = a[ind1, :ind1]
   21530             :  *             lu[ind1, ind1] = 1             # <<<<<<<<<<<<<<
   21531             :  * 
   21532             :  *         for ind2 in range(mn - 1):  # cols
   21533             :  */
   21534         611 :       __pyx_t_9 = __pyx_v_ind1;
   21535         611 :       __pyx_t_10 = __pyx_v_ind1;
   21536         611 :       *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_lu.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_lu.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_lu.diminfo[1].strides) = 1.0;
   21537             :     }
   21538             : 
   21539             :     /* "scipy/linalg/_decomp_lu_cython.pyx":130
   21540             :  *             lu[ind1, ind1] = 1
   21541             :  * 
   21542             :  *         for ind2 in range(mn - 1):  # cols             # <<<<<<<<<<<<<<
   21543             :  *             for ind1 in range(ind2+1, m):  # rows
   21544             :  *                 a[ind1, ind2] = 0
   21545             :  */
   21546          72 :     __pyx_t_14 = (__pyx_v_mn - 1);
   21547          72 :     __pyx_t_15 = __pyx_t_14;
   21548         683 :     for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_15; __pyx_t_3+=1) {
   21549         611 :       __pyx_v_ind2 = __pyx_t_3;
   21550             : 
   21551             :       /* "scipy/linalg/_decomp_lu_cython.pyx":131
   21552             :  * 
   21553             :  *         for ind2 in range(mn - 1):  # cols
   21554             :  *             for ind1 in range(ind2+1, m):  # rows             # <<<<<<<<<<<<<<
   21555             :  *                 a[ind1, ind2] = 0
   21556             :  * 
   21557             :  */
   21558         611 :       __pyx_t_1 = __pyx_v_m;
   21559         611 :       __pyx_t_2 = __pyx_t_1;
   21560       15032 :       for (__pyx_t_16 = (__pyx_v_ind2 + 1); __pyx_t_16 < __pyx_t_2; __pyx_t_16+=1) {
   21561       14421 :         __pyx_v_ind1 = __pyx_t_16;
   21562             : 
   21563             :         /* "scipy/linalg/_decomp_lu_cython.pyx":132
   21564             :  *         for ind2 in range(mn - 1):  # cols
   21565             :  *             for ind1 in range(ind2+1, m):  # rows
   21566             :  *                 a[ind1, ind2] = 0             # <<<<<<<<<<<<<<
   21567             :  * 
   21568             :  *     if permute_l:
   21569             :  */
   21570       14421 :         __pyx_t_10 = __pyx_v_ind1;
   21571       14421 :         __pyx_t_9 = __pyx_v_ind2;
   21572       14421 :         *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_float64_t *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_a.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_a.diminfo[1].strides) = 0.0;
   21573             :       }
   21574             :     }
   21575             :   }
   21576          72 :   __pyx_L16:;
   21577             : 
   21578             :   /* "scipy/linalg/_decomp_lu_cython.pyx":134
   21579             :  *                 a[ind1, ind2] = 0
   21580             :  * 
   21581             :  *     if permute_l:             # <<<<<<<<<<<<<<
   21582             :  *         # b still exists -> use it as temp array
   21583             :  *         # we copy everything to b and pick back
   21584             :  */
   21585          95 :   if (__pyx_v_permute_l) {
   21586             : 
   21587             :     /* "scipy/linalg/_decomp_lu_cython.pyx":139
   21588             :  *         # rows from b as dictated by perm
   21589             :  * 
   21590             :  *         if m > n:             # <<<<<<<<<<<<<<
   21591             :  *             b[:, :] = a[:, :]
   21592             :  *             # memcpy(bb, &a[0, 0], m*mn*sizeof(lapack_t))
   21593             :  */
   21594          20 :     __pyx_t_4 = (__pyx_v_m > __pyx_v_n);
   21595          20 :     if (__pyx_t_4) {
   21596             : 
   21597             :       /* "scipy/linalg/_decomp_lu_cython.pyx":140
   21598             :  * 
   21599             :  *         if m > n:
   21600             :  *             b[:, :] = a[:, :]             # <<<<<<<<<<<<<<
   21601             :  *             # memcpy(bb, &a[0, 0], m*mn*sizeof(lapack_t))
   21602             :  *             for ind1 in range(m):
   21603             :  */
   21604          10 :       __pyx_t_12 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_a), __pyx_tuple__26); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 140, __pyx_L1_error)
   21605          10 :       __Pyx_GOTREF(__pyx_t_12);
   21606          10 :       if (unlikely((PyObject_SetItem(__pyx_v_b, __pyx_tuple__29, __pyx_t_12) < 0))) __PYX_ERR(0, 140, __pyx_L1_error)
   21607          10 :       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
   21608             : 
   21609             :       /* "scipy/linalg/_decomp_lu_cython.pyx":142
   21610             :  *             b[:, :] = a[:, :]
   21611             :  *             # memcpy(bb, &a[0, 0], m*mn*sizeof(lapack_t))
   21612             :  *             for ind1 in range(m):             # <<<<<<<<<<<<<<
   21613             :  *                 if perm[ind1] == ind1:
   21614             :  *                     continue
   21615             :  */
   21616          10 :       __pyx_t_3 = __pyx_v_m;
   21617          10 :       __pyx_t_1 = __pyx_t_3;
   21618         146 :       for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   21619         136 :         __pyx_v_ind1 = __pyx_t_2;
   21620             : 
   21621             :         /* "scipy/linalg/_decomp_lu_cython.pyx":143
   21622             :  *             # memcpy(bb, &a[0, 0], m*mn*sizeof(lapack_t))
   21623             :  *             for ind1 in range(m):
   21624             :  *                 if perm[ind1] == ind1:             # <<<<<<<<<<<<<<
   21625             :  *                     continue
   21626             :  *                 else:
   21627             :  */
   21628         136 :         __pyx_t_9 = __pyx_v_ind1;
   21629         136 :         __pyx_t_4 = ((*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) ))) == __pyx_v_ind1);
   21630         136 :         if (__pyx_t_4) {
   21631             : 
   21632             :           /* "scipy/linalg/_decomp_lu_cython.pyx":144
   21633             :  *             for ind1 in range(m):
   21634             :  *                 if perm[ind1] == ind1:
   21635             :  *                     continue             # <<<<<<<<<<<<<<
   21636             :  *                 else:
   21637             :  *                     a[ind1, :] = b[perm[ind1], :]
   21638             :  */
   21639          60 :           goto __pyx_L29_continue;
   21640             : 
   21641             :           /* "scipy/linalg/_decomp_lu_cython.pyx":143
   21642             :  *             # memcpy(bb, &a[0, 0], m*mn*sizeof(lapack_t))
   21643             :  *             for ind1 in range(m):
   21644             :  *                 if perm[ind1] == ind1:             # <<<<<<<<<<<<<<
   21645             :  *                     continue
   21646             :  *                 else:
   21647             :  */
   21648             :         }
   21649             : 
   21650             :         /* "scipy/linalg/_decomp_lu_cython.pyx":146
   21651             :  *                     continue
   21652             :  *                 else:
   21653             :  *                     a[ind1, :] = b[perm[ind1], :]             # <<<<<<<<<<<<<<
   21654             :  * 
   21655             :  *         else:  # same but for lu array
   21656             :  */
   21657             :         /*else*/ {
   21658          76 :           __pyx_t_9 = __pyx_v_ind1;
   21659          76 :           __pyx_t_12 = __Pyx_PyInt_From_int((*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) )))); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 146, __pyx_L1_error)
   21660          76 :           __Pyx_GOTREF(__pyx_t_12);
   21661          76 :           __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 146, __pyx_L1_error)
   21662          76 :           __Pyx_GOTREF(__pyx_t_13);
   21663          76 :           __Pyx_GIVEREF(__pyx_t_12);
   21664          76 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12)) __PYX_ERR(0, 146, __pyx_L1_error);
   21665          76 :           __Pyx_INCREF(__pyx_slice__30);
   21666          76 :           __Pyx_GIVEREF(__pyx_slice__30);
   21667          76 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_slice__30)) __PYX_ERR(0, 146, __pyx_L1_error);
   21668          76 :           __pyx_t_12 = 0;
   21669          76 :           __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_v_b, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 146, __pyx_L1_error)
   21670          76 :           __Pyx_GOTREF(__pyx_t_12);
   21671          76 :           __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   21672          76 :           __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 146, __pyx_L1_error)
   21673          76 :           __Pyx_GOTREF(__pyx_t_13);
   21674          76 :           __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 146, __pyx_L1_error)
   21675          76 :           __Pyx_GOTREF(__pyx_t_8);
   21676          76 :           __Pyx_GIVEREF(__pyx_t_13);
   21677          76 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_13)) __PYX_ERR(0, 146, __pyx_L1_error);
   21678          76 :           __Pyx_INCREF(__pyx_slice__31);
   21679          76 :           __Pyx_GIVEREF(__pyx_slice__31);
   21680          76 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_slice__31)) __PYX_ERR(0, 146, __pyx_L1_error);
   21681          76 :           __pyx_t_13 = 0;
   21682          76 :           if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_a), __pyx_t_8, __pyx_t_12) < 0))) __PYX_ERR(0, 146, __pyx_L1_error)
   21683          76 :           __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   21684          76 :           __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
   21685             :         }
   21686         136 :         __pyx_L29_continue:;
   21687             :       }
   21688             : 
   21689             :       /* "scipy/linalg/_decomp_lu_cython.pyx":139
   21690             :  *         # rows from b as dictated by perm
   21691             :  * 
   21692             :  *         if m > n:             # <<<<<<<<<<<<<<
   21693             :  *             b[:, :] = a[:, :]
   21694             :  *             # memcpy(bb, &a[0, 0], m*mn*sizeof(lapack_t))
   21695             :  */
   21696          10 :       goto __pyx_L28;
   21697             :     }
   21698             : 
   21699             :     /* "scipy/linalg/_decomp_lu_cython.pyx":149
   21700             :  * 
   21701             :  *         else:  # same but for lu array
   21702             :  *             b[:mn, :mn] = lu[:, :]             # <<<<<<<<<<<<<<
   21703             :  *             # memcpy(bb, &lu[0, 0], mn*n*sizeof(lapack_t))
   21704             :  *             for ind1 in range(mn):
   21705             :  */
   21706             :     /*else*/ {
   21707          10 :       __pyx_t_12 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_lu), __pyx_tuple__34); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 149, __pyx_L1_error)
   21708          10 :       __Pyx_GOTREF(__pyx_t_12);
   21709          10 :       __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_mn); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 149, __pyx_L1_error)
   21710          10 :       __Pyx_GOTREF(__pyx_t_8);
   21711          10 :       __pyx_t_13 = PySlice_New(Py_None, __pyx_t_8, Py_None); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 149, __pyx_L1_error)
   21712          10 :       __Pyx_GOTREF(__pyx_t_13);
   21713          10 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   21714          10 :       __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_mn); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 149, __pyx_L1_error)
   21715          10 :       __Pyx_GOTREF(__pyx_t_8);
   21716          10 :       __pyx_t_11 = PySlice_New(Py_None, __pyx_t_8, Py_None); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 149, __pyx_L1_error)
   21717          10 :       __Pyx_GOTREF(__pyx_t_11);
   21718          10 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   21719          10 :       __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 149, __pyx_L1_error)
   21720          10 :       __Pyx_GOTREF(__pyx_t_8);
   21721          10 :       __Pyx_GIVEREF(__pyx_t_13);
   21722          10 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_13)) __PYX_ERR(0, 149, __pyx_L1_error);
   21723          10 :       __Pyx_GIVEREF(__pyx_t_11);
   21724          10 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_11)) __PYX_ERR(0, 149, __pyx_L1_error);
   21725          10 :       __pyx_t_13 = 0;
   21726          10 :       __pyx_t_11 = 0;
   21727          10 :       if (unlikely((PyObject_SetItem(__pyx_v_b, __pyx_t_8, __pyx_t_12) < 0))) __PYX_ERR(0, 149, __pyx_L1_error)
   21728          10 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   21729          10 :       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
   21730             : 
   21731             :       /* "scipy/linalg/_decomp_lu_cython.pyx":151
   21732             :  *             b[:mn, :mn] = lu[:, :]
   21733             :  *             # memcpy(bb, &lu[0, 0], mn*n*sizeof(lapack_t))
   21734             :  *             for ind1 in range(mn):             # <<<<<<<<<<<<<<
   21735             :  *                 if perm[ind1] == ind1:
   21736             :  *                     continue
   21737             :  */
   21738          92 :       __pyx_t_3 = __pyx_v_mn;
   21739          92 :       __pyx_t_1 = __pyx_t_3;
   21740          92 :       for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   21741          82 :         __pyx_v_ind1 = __pyx_t_2;
   21742             : 
   21743             :         /* "scipy/linalg/_decomp_lu_cython.pyx":152
   21744             :  *             # memcpy(bb, &lu[0, 0], mn*n*sizeof(lapack_t))
   21745             :  *             for ind1 in range(mn):
   21746             :  *                 if perm[ind1] == ind1:             # <<<<<<<<<<<<<<
   21747             :  *                     continue
   21748             :  *                 else:
   21749             :  */
   21750          82 :         __pyx_t_9 = __pyx_v_ind1;
   21751          82 :         __pyx_t_4 = ((*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) ))) == __pyx_v_ind1);
   21752          82 :         if (__pyx_t_4) {
   21753             : 
   21754             :           /* "scipy/linalg/_decomp_lu_cython.pyx":153
   21755             :  *             for ind1 in range(mn):
   21756             :  *                 if perm[ind1] == ind1:
   21757             :  *                     continue             # <<<<<<<<<<<<<<
   21758             :  *                 else:
   21759             :  *                     lu[ind1, :] = b[perm[ind1], :mn]
   21760             :  */
   21761           4 :           goto __pyx_L32_continue;
   21762             : 
   21763             :           /* "scipy/linalg/_decomp_lu_cython.pyx":152
   21764             :  *             # memcpy(bb, &lu[0, 0], mn*n*sizeof(lapack_t))
   21765             :  *             for ind1 in range(mn):
   21766             :  *                 if perm[ind1] == ind1:             # <<<<<<<<<<<<<<
   21767             :  *                     continue
   21768             :  *                 else:
   21769             :  */
   21770             :         }
   21771             : 
   21772             :         /* "scipy/linalg/_decomp_lu_cython.pyx":155
   21773             :  *                     continue
   21774             :  *                 else:
   21775             :  *                     lu[ind1, :] = b[perm[ind1], :mn]             # <<<<<<<<<<<<<<
   21776             :  * 
   21777             :  * 
   21778             :  */
   21779             :         /*else*/ {
   21780          78 :           __pyx_t_9 = __pyx_v_ind1;
   21781          78 :           __pyx_t_12 = __Pyx_PyInt_From_int((*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) )))); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 155, __pyx_L1_error)
   21782          78 :           __Pyx_GOTREF(__pyx_t_12);
   21783          78 :           __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_mn); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 155, __pyx_L1_error)
   21784          78 :           __Pyx_GOTREF(__pyx_t_8);
   21785          78 :           __pyx_t_11 = PySlice_New(Py_None, __pyx_t_8, Py_None); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 155, __pyx_L1_error)
   21786          78 :           __Pyx_GOTREF(__pyx_t_11);
   21787          78 :           __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   21788          78 :           __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 155, __pyx_L1_error)
   21789          78 :           __Pyx_GOTREF(__pyx_t_8);
   21790          78 :           __Pyx_GIVEREF(__pyx_t_12);
   21791          78 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_12)) __PYX_ERR(0, 155, __pyx_L1_error);
   21792          78 :           __Pyx_GIVEREF(__pyx_t_11);
   21793          78 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_11)) __PYX_ERR(0, 155, __pyx_L1_error);
   21794          78 :           __pyx_t_12 = 0;
   21795          78 :           __pyx_t_11 = 0;
   21796          78 :           __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_v_b, __pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 155, __pyx_L1_error)
   21797          78 :           __Pyx_GOTREF(__pyx_t_11);
   21798          78 :           __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   21799          78 :           __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 155, __pyx_L1_error)
   21800          78 :           __Pyx_GOTREF(__pyx_t_8);
   21801          78 :           __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 155, __pyx_L1_error)
   21802          78 :           __Pyx_GOTREF(__pyx_t_12);
   21803          78 :           __Pyx_GIVEREF(__pyx_t_8);
   21804          78 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_8)) __PYX_ERR(0, 155, __pyx_L1_error);
   21805          78 :           __Pyx_INCREF(__pyx_slice__35);
   21806          78 :           __Pyx_GIVEREF(__pyx_slice__35);
   21807          78 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_slice__35)) __PYX_ERR(0, 155, __pyx_L1_error);
   21808          78 :           __pyx_t_8 = 0;
   21809          78 :           if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_lu), __pyx_t_12, __pyx_t_11) < 0))) __PYX_ERR(0, 155, __pyx_L1_error)
   21810          78 :           __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
   21811          78 :           __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   21812             :         }
   21813          82 :         __pyx_L32_continue:;
   21814             :       }
   21815             :     }
   21816          10 :     __pyx_L28:;
   21817             : 
   21818             :     /* "scipy/linalg/_decomp_lu_cython.pyx":134
   21819             :  *                 a[ind1, ind2] = 0
   21820             :  * 
   21821             :  *     if permute_l:             # <<<<<<<<<<<<<<
   21822             :  *         # b still exists -> use it as temp array
   21823             :  *         # we copy everything to b and pick back
   21824             :  */
   21825             :   }
   21826             : 
   21827             :   /* "scipy/linalg/_decomp_lu_cython.pyx":22
   21828             :  * @cython.boundscheck(False)
   21829             :  * @cython.initializedcheck(False)
   21830             :  * cdef void lu_decompose(cnp.ndarray[lapack_t, ndim=2] a,             # <<<<<<<<<<<<<<
   21831             :  *                        cnp.ndarray[lapack_t, ndim=2] lu,
   21832             :  *                        int[::1] perm,
   21833             :  */
   21834             : 
   21835             :   /* function exit code */
   21836          95 :   goto __pyx_L0;
   21837           0 :   __pyx_L1_error:;
   21838           0 :   __Pyx_XDECREF(__pyx_t_5);
   21839           0 :   __Pyx_XDECREF(__pyx_t_8);
   21840           0 :   __Pyx_XDECREF(__pyx_t_11);
   21841           0 :   __Pyx_XDECREF(__pyx_t_12);
   21842           0 :   __Pyx_XDECREF(__pyx_t_13);
   21843           0 :   { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
   21844           0 :     __Pyx_PyThreadState_declare
   21845           0 :     __Pyx_PyThreadState_assign
   21846           0 :     __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
   21847           0 :     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a.rcbuffer->pybuffer);
   21848           0 :     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lu.rcbuffer->pybuffer);
   21849           0 :   __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
   21850           0 :   __Pyx_WriteUnraisable("scipy.linalg._decomp_lu_cython.lu_decompose", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
   21851           0 :   goto __pyx_L2;
   21852          95 :   __pyx_L0:;
   21853          95 :   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a.rcbuffer->pybuffer);
   21854          95 :   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lu.rcbuffer->pybuffer);
   21855          95 :   __pyx_L2:;
   21856          95 :   __Pyx_XDECREF(__pyx_v_b);
   21857          95 :   __Pyx_RefNannyFinishContext();
   21858          95 : }
   21859             : 
   21860           6 : static void __pyx_fuse_2__pyx_f_5scipy_6linalg_17_decomp_lu_cython_lu_decompose(PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_lu, __Pyx_memviewslice __pyx_v_perm, int __pyx_v_permute_l) {
   21861           6 :   int __pyx_v_m;
   21862           6 :   int __pyx_v_n;
   21863           6 :   int __pyx_v_mn;
   21864           6 :   npy_intp __pyx_v_dims[2];
   21865           6 :   int __pyx_v_info;
   21866           6 :   int __pyx_v_ind1;
   21867           6 :   int __pyx_v_ind2;
   21868           6 :   int __pyx_v_tmp_int;
   21869           6 :   __pyx_t_float_complex *__pyx_v_aa;
   21870           6 :   __pyx_t_float_complex *__pyx_v_bb;
   21871           6 :   int *__pyx_v_ipiv;
   21872           6 :   PyObject *__pyx_v_b = NULL;
   21873           6 :   __Pyx_LocalBuf_ND __pyx_pybuffernd_a;
   21874           6 :   __Pyx_Buffer __pyx_pybuffer_a;
   21875           6 :   __Pyx_LocalBuf_ND __pyx_pybuffernd_lu;
   21876           6 :   __Pyx_Buffer __pyx_pybuffer_lu;
   21877             :   __Pyx_RefNannyDeclarations
   21878           6 :   int __pyx_t_1;
   21879           6 :   int __pyx_t_2;
   21880           6 :   int __pyx_t_3;
   21881           6 :   int __pyx_t_4;
   21882           6 :   PyObject *__pyx_t_5 = NULL;
   21883           6 :   Py_ssize_t __pyx_t_6;
   21884           6 :   Py_UCS4 __pyx_t_7;
   21885           6 :   PyObject *__pyx_t_8 = NULL;
   21886           6 :   Py_ssize_t __pyx_t_9;
   21887           6 :   Py_ssize_t __pyx_t_10;
   21888           6 :   PyObject *__pyx_t_11 = NULL;
   21889           6 :   PyObject *__pyx_t_12 = NULL;
   21890           6 :   PyObject *__pyx_t_13 = NULL;
   21891           6 :   long __pyx_t_14;
   21892           6 :   long __pyx_t_15;
   21893           6 :   int __pyx_t_16;
   21894           6 :   int __pyx_lineno = 0;
   21895           6 :   const char *__pyx_filename = NULL;
   21896           6 :   int __pyx_clineno = 0;
   21897           6 :   __Pyx_RefNannySetupContext("__pyx_fuse_2lu_decompose", 1);
   21898           6 :   __pyx_pybuffer_a.pybuffer.buf = NULL;
   21899           6 :   __pyx_pybuffer_a.refcount = 0;
   21900           6 :   __pyx_pybuffernd_a.data = NULL;
   21901           6 :   __pyx_pybuffernd_a.rcbuffer = &__pyx_pybuffer_a;
   21902           6 :   __pyx_pybuffer_lu.pybuffer.buf = NULL;
   21903           6 :   __pyx_pybuffer_lu.refcount = 0;
   21904           6 :   __pyx_pybuffernd_lu.data = NULL;
   21905           6 :   __pyx_pybuffernd_lu.rcbuffer = &__pyx_pybuffer_lu;
   21906             :   {
   21907           6 :     __Pyx_BufFmt_StackElem __pyx_stack[1];
   21908           6 :     if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a.rcbuffer->pybuffer, (PyObject*)__pyx_v_a, &__Pyx_TypeInfo___pyx_t_float_complex, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 22, __pyx_L1_error)
   21909             :   }
   21910           6 :   __pyx_pybuffernd_a.diminfo[0].strides = __pyx_pybuffernd_a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a.diminfo[0].shape = __pyx_pybuffernd_a.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_a.diminfo[1].strides = __pyx_pybuffernd_a.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_a.diminfo[1].shape = __pyx_pybuffernd_a.rcbuffer->pybuffer.shape[1];
   21911             :   {
   21912           6 :     __Pyx_BufFmt_StackElem __pyx_stack[1];
   21913           6 :     if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lu.rcbuffer->pybuffer, (PyObject*)__pyx_v_lu, &__Pyx_TypeInfo___pyx_t_float_complex, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 22, __pyx_L1_error)
   21914             :   }
   21915           6 :   __pyx_pybuffernd_lu.diminfo[0].strides = __pyx_pybuffernd_lu.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lu.diminfo[0].shape = __pyx_pybuffernd_lu.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_lu.diminfo[1].strides = __pyx_pybuffernd_lu.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_lu.diminfo[1].shape = __pyx_pybuffernd_lu.rcbuffer->pybuffer.shape[1];
   21916             : 
   21917             :   /* "scipy/linalg/_decomp_lu_cython.pyx":50
   21918             :  * 
   21919             :  *     """
   21920             :  *     cdef int m = a.shape[0], n = a.shape[1], mn = min(m, n)             # <<<<<<<<<<<<<<
   21921             :  *     cdef cnp.npy_intp dims[2]
   21922             :  *     cdef int info = 0, ind1, ind2, tmp_int
   21923             :  */
   21924           6 :   __pyx_v_m = (__pyx_f_5numpy_7ndarray_5shape_shape(((PyArrayObject *)__pyx_v_a))[0]);
   21925           6 :   __pyx_v_n = (__pyx_f_5numpy_7ndarray_5shape_shape(((PyArrayObject *)__pyx_v_a))[1]);
   21926           6 :   __pyx_t_1 = __pyx_v_n;
   21927           6 :   __pyx_t_2 = __pyx_v_m;
   21928           6 :   __pyx_t_4 = (__pyx_t_1 < __pyx_t_2);
   21929           6 :   if (__pyx_t_4) {
   21930             :     __pyx_t_3 = __pyx_t_1;
   21931             :   } else {
   21932             :     __pyx_t_3 = __pyx_t_2;
   21933             :   }
   21934           6 :   __pyx_v_mn = __pyx_t_3;
   21935             : 
   21936             :   /* "scipy/linalg/_decomp_lu_cython.pyx":52
   21937             :  *     cdef int m = a.shape[0], n = a.shape[1], mn = min(m, n)
   21938             :  *     cdef cnp.npy_intp dims[2]
   21939             :  *     cdef int info = 0, ind1, ind2, tmp_int             # <<<<<<<<<<<<<<
   21940             :  *     cdef lapack_t *aa = <lapack_t *>cnp.PyArray_DATA(a)
   21941             :  *     cdef lapack_t *bb
   21942             :  */
   21943           6 :   __pyx_v_info = 0;
   21944             : 
   21945             :   /* "scipy/linalg/_decomp_lu_cython.pyx":53
   21946             :  *     cdef cnp.npy_intp dims[2]
   21947             :  *     cdef int info = 0, ind1, ind2, tmp_int
   21948             :  *     cdef lapack_t *aa = <lapack_t *>cnp.PyArray_DATA(a)             # <<<<<<<<<<<<<<
   21949             :  *     cdef lapack_t *bb
   21950             :  *     cdef int *ipiv = <int*>PyMem_Malloc(m * sizeof(int))
   21951             :  */
   21952           6 :   __pyx_v_aa = ((__pyx_t_float_complex *)PyArray_DATA(((PyArrayObject *)__pyx_v_a)));
   21953             : 
   21954             :   /* "scipy/linalg/_decomp_lu_cython.pyx":55
   21955             :  *     cdef lapack_t *aa = <lapack_t *>cnp.PyArray_DATA(a)
   21956             :  *     cdef lapack_t *bb
   21957             :  *     cdef int *ipiv = <int*>PyMem_Malloc(m * sizeof(int))             # <<<<<<<<<<<<<<
   21958             :  *     if not ipiv:
   21959             :  *         raise MemoryError('scipy.linalg.lu failed to allocate '
   21960             :  */
   21961           6 :   __pyx_v_ipiv = ((int *)PyMem_Malloc((__pyx_v_m * (sizeof(int)))));
   21962             : 
   21963             :   /* "scipy/linalg/_decomp_lu_cython.pyx":56
   21964             :  *     cdef lapack_t *bb
   21965             :  *     cdef int *ipiv = <int*>PyMem_Malloc(m * sizeof(int))
   21966             :  *     if not ipiv:             # <<<<<<<<<<<<<<
   21967             :  *         raise MemoryError('scipy.linalg.lu failed to allocate '
   21968             :  *                           'required memory.')
   21969             :  */
   21970           6 :   __pyx_t_4 = (!(__pyx_v_ipiv != 0));
   21971           6 :   if (unlikely(__pyx_t_4)) {
   21972             : 
   21973             :     /* "scipy/linalg/_decomp_lu_cython.pyx":57
   21974             :  *     cdef int *ipiv = <int*>PyMem_Malloc(m * sizeof(int))
   21975             :  *     if not ipiv:
   21976             :  *         raise MemoryError('scipy.linalg.lu failed to allocate '             # <<<<<<<<<<<<<<
   21977             :  *                           'required memory.')
   21978             :  *     dims[0] = m
   21979             :  */
   21980           0 :     __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 57, __pyx_L1_error)
   21981           0 :     __Pyx_GOTREF(__pyx_t_5);
   21982           0 :     __Pyx_Raise(__pyx_t_5, 0, 0, 0);
   21983           0 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   21984           0 :     __PYX_ERR(0, 57, __pyx_L1_error)
   21985             : 
   21986             :     /* "scipy/linalg/_decomp_lu_cython.pyx":56
   21987             :  *     cdef lapack_t *bb
   21988             :  *     cdef int *ipiv = <int*>PyMem_Malloc(m * sizeof(int))
   21989             :  *     if not ipiv:             # <<<<<<<<<<<<<<
   21990             :  *         raise MemoryError('scipy.linalg.lu failed to allocate '
   21991             :  *                           'required memory.')
   21992             :  */
   21993             :   }
   21994             : 
   21995             :   /* "scipy/linalg/_decomp_lu_cython.pyx":59
   21996             :  *         raise MemoryError('scipy.linalg.lu failed to allocate '
   21997             :  *                           'required memory.')
   21998             :  *     dims[0] = m             # <<<<<<<<<<<<<<
   21999             :  *     dims[1] = n
   22000             :  * 
   22001             :  */
   22002           6 :   (__pyx_v_dims[0]) = __pyx_v_m;
   22003             : 
   22004             :   /* "scipy/linalg/_decomp_lu_cython.pyx":60
   22005             :  *                           'required memory.')
   22006             :  *     dims[0] = m
   22007             :  *     dims[1] = n             # <<<<<<<<<<<<<<
   22008             :  * 
   22009             :  *     if lapack_t is cnp.float32_t:
   22010             :  */
   22011           6 :   (__pyx_v_dims[1]) = __pyx_v_n;
   22012             : 
   22013             :   /* "scipy/linalg/_decomp_lu_cython.pyx":73
   22014             :  *         dgetrf(&m, &n, bb, &m, ipiv, &info)
   22015             :  *     elif lapack_t is cnp.complex64_t:
   22016             :  *         b = cnp.PyArray_SimpleNew(2, dims, cnp.NPY_COMPLEX64)             # <<<<<<<<<<<<<<
   22017             :  *         bb = <cnp.complex64_t *>cnp.PyArray_DATA(b)
   22018             :  *         swap_c_and_f_layout(aa, bb, m, n)
   22019             :  */
   22020           6 :   __pyx_t_5 = PyArray_SimpleNew(2, __pyx_v_dims, NPY_COMPLEX64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 73, __pyx_L1_error)
   22021           6 :   __Pyx_GOTREF(__pyx_t_5);
   22022           6 :   __pyx_v_b = __pyx_t_5;
   22023           6 :   __pyx_t_5 = 0;
   22024             : 
   22025             :   /* "scipy/linalg/_decomp_lu_cython.pyx":74
   22026             :  *     elif lapack_t is cnp.complex64_t:
   22027             :  *         b = cnp.PyArray_SimpleNew(2, dims, cnp.NPY_COMPLEX64)
   22028             :  *         bb = <cnp.complex64_t *>cnp.PyArray_DATA(b)             # <<<<<<<<<<<<<<
   22029             :  *         swap_c_and_f_layout(aa, bb, m, n)
   22030             :  *         cgetrf(&m, &n, bb, &m, ipiv, &info)
   22031             :  */
   22032           6 :   if (!(likely(((__pyx_v_b) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_b, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 74, __pyx_L1_error)
   22033           6 :   __pyx_v_bb = ((__pyx_t_float_complex *)PyArray_DATA(((PyArrayObject *)__pyx_v_b)));
   22034             : 
   22035             :   /* "scipy/linalg/_decomp_lu_cython.pyx":75
   22036             :  *         b = cnp.PyArray_SimpleNew(2, dims, cnp.NPY_COMPLEX64)
   22037             :  *         bb = <cnp.complex64_t *>cnp.PyArray_DATA(b)
   22038             :  *         swap_c_and_f_layout(aa, bb, m, n)             # <<<<<<<<<<<<<<
   22039             :  *         cgetrf(&m, &n, bb, &m, ipiv, &info)
   22040             :  *     else:
   22041             :  */
   22042           6 :   __pyx_fuse_2__pyx_f_5scipy_6linalg_23_cythonized_array_utils_swap_c_and_f_layout(__pyx_v_aa, __pyx_v_bb, __pyx_v_m, __pyx_v_n);
   22043             : 
   22044             :   /* "scipy/linalg/_decomp_lu_cython.pyx":76
   22045             :  *         bb = <cnp.complex64_t *>cnp.PyArray_DATA(b)
   22046             :  *         swap_c_and_f_layout(aa, bb, m, n)
   22047             :  *         cgetrf(&m, &n, bb, &m, ipiv, &info)             # <<<<<<<<<<<<<<
   22048             :  *     else:
   22049             :  *         b = cnp.PyArray_SimpleNew(2, dims, cnp.NPY_COMPLEX128)
   22050             :  */
   22051           6 :   __pyx_f_5scipy_6linalg_13cython_lapack_cgetrf((&__pyx_v_m), (&__pyx_v_n), __pyx_v_bb, (&__pyx_v_m), __pyx_v_ipiv, (&__pyx_v_info));
   22052             : 
   22053             :   /* "scipy/linalg/_decomp_lu_cython.pyx":83
   22054             :  *         zgetrf(&m, &n, bb, &m, ipiv, &info)
   22055             :  * 
   22056             :  *     if info < 0:             # <<<<<<<<<<<<<<
   22057             :  *         raise ValueError('scipy.linalg.lu has encountered an internal'
   22058             :  *                          ' error in ?getrf routine with invalid value'
   22059             :  */
   22060           6 :   __pyx_t_4 = (__pyx_v_info < 0);
   22061           6 :   if (unlikely(__pyx_t_4)) {
   22062             : 
   22063             :     /* "scipy/linalg/_decomp_lu_cython.pyx":84
   22064             :  * 
   22065             :  *     if info < 0:
   22066             :  *         raise ValueError('scipy.linalg.lu has encountered an internal'             # <<<<<<<<<<<<<<
   22067             :  *                          ' error in ?getrf routine with invalid value'
   22068             :  *                          f' at {-info}-th parameter.')
   22069             :  */
   22070           0 :     __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 84, __pyx_L1_error)
   22071           0 :     __Pyx_GOTREF(__pyx_t_5);
   22072           0 :     __pyx_t_6 = 0;
   22073           0 :     __pyx_t_7 = 127;
   22074           0 :     __Pyx_INCREF(__pyx_kp_u_scipy_linalg_lu_has_encountered);
   22075           0 :     __pyx_t_6 += 90;
   22076           0 :     __Pyx_GIVEREF(__pyx_kp_u_scipy_linalg_lu_has_encountered);
   22077           0 :     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_scipy_linalg_lu_has_encountered);
   22078             : 
   22079             :     /* "scipy/linalg/_decomp_lu_cython.pyx":86
   22080             :  *         raise ValueError('scipy.linalg.lu has encountered an internal'
   22081             :  *                          ' error in ?getrf routine with invalid value'
   22082             :  *                          f' at {-info}-th parameter.')             # <<<<<<<<<<<<<<
   22083             :  * 
   22084             :  *     # Get the result back to C-contiguous layout and clean-up
   22085             :  */
   22086           0 :     __pyx_t_8 = __Pyx_PyUnicode_From_int((-__pyx_v_info), 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 86, __pyx_L1_error)
   22087           0 :     __Pyx_GOTREF(__pyx_t_8);
   22088           0 :     __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
   22089           0 :     __Pyx_GIVEREF(__pyx_t_8);
   22090           0 :     PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_8);
   22091           0 :     __pyx_t_8 = 0;
   22092           0 :     __Pyx_INCREF(__pyx_kp_u_th_parameter);
   22093           0 :     __pyx_t_6 += 14;
   22094           0 :     __Pyx_GIVEREF(__pyx_kp_u_th_parameter);
   22095           0 :     PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_th_parameter);
   22096             : 
   22097             :     /* "scipy/linalg/_decomp_lu_cython.pyx":84
   22098             :  * 
   22099             :  *     if info < 0:
   22100             :  *         raise ValueError('scipy.linalg.lu has encountered an internal'             # <<<<<<<<<<<<<<
   22101             :  *                          ' error in ?getrf routine with invalid value'
   22102             :  *                          f' at {-info}-th parameter.')
   22103             :  */
   22104           0 :     __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 84, __pyx_L1_error)
   22105           0 :     __Pyx_GOTREF(__pyx_t_8);
   22106           0 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   22107           0 :     __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 84, __pyx_L1_error)
   22108           0 :     __Pyx_GOTREF(__pyx_t_5);
   22109           0 :     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   22110           0 :     __Pyx_Raise(__pyx_t_5, 0, 0, 0);
   22111           0 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   22112           0 :     __PYX_ERR(0, 84, __pyx_L1_error)
   22113             : 
   22114             :     /* "scipy/linalg/_decomp_lu_cython.pyx":83
   22115             :  *         zgetrf(&m, &n, bb, &m, ipiv, &info)
   22116             :  * 
   22117             :  *     if info < 0:             # <<<<<<<<<<<<<<
   22118             :  *         raise ValueError('scipy.linalg.lu has encountered an internal'
   22119             :  *                          ' error in ?getrf routine with invalid value'
   22120             :  */
   22121             :   }
   22122             : 
   22123             :   /* "scipy/linalg/_decomp_lu_cython.pyx":89
   22124             :  * 
   22125             :  *     # Get the result back to C-contiguous layout and clean-up
   22126             :  *     swap_c_and_f_layout(bb, aa, n, m)             # <<<<<<<<<<<<<<
   22127             :  * 
   22128             :  *     # Convert swaps on A to permutations on L since A = P @ L @ U
   22129             :  */
   22130           6 :   __pyx_fuse_2__pyx_f_5scipy_6linalg_23_cythonized_array_utils_swap_c_and_f_layout(__pyx_v_bb, __pyx_v_aa, __pyx_v_n, __pyx_v_m);
   22131             : 
   22132             :   /* "scipy/linalg/_decomp_lu_cython.pyx":92
   22133             :  * 
   22134             :  *     # Convert swaps on A to permutations on L since A = P @ L @ U
   22135             :  *     try:             # <<<<<<<<<<<<<<
   22136             :  *         # Basically we are following the cycles in ipiv
   22137             :  *         # and swapping an "np.arange" array for the inverse perm.
   22138             :  */
   22139             :   /*try:*/ {
   22140             : 
   22141             :     /* "scipy/linalg/_decomp_lu_cython.pyx":96
   22142             :  *         # and swapping an "np.arange" array for the inverse perm.
   22143             :  *         # Initialize perm
   22144             :  *         for ind1 in range(m): perm[ind1] = ind1             # <<<<<<<<<<<<<<
   22145             :  *         for ind1 in range(mn):
   22146             :  *             tmp_int = perm[ipiv[ind1]-1]
   22147             :  */
   22148           6 :     __pyx_t_3 = __pyx_v_m;
   22149           6 :     __pyx_t_1 = __pyx_t_3;
   22150          24 :     for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   22151          18 :       __pyx_v_ind1 = __pyx_t_2;
   22152          18 :       __pyx_t_9 = __pyx_v_ind1;
   22153          18 :       *((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) )) = __pyx_v_ind1;
   22154             :     }
   22155             : 
   22156             :     /* "scipy/linalg/_decomp_lu_cython.pyx":97
   22157             :  *         # Initialize perm
   22158             :  *         for ind1 in range(m): perm[ind1] = ind1
   22159             :  *         for ind1 in range(mn):             # <<<<<<<<<<<<<<
   22160             :  *             tmp_int = perm[ipiv[ind1]-1]
   22161             :  *             perm[ipiv[ind1]-1] = perm[ind1]
   22162             :  */
   22163          24 :     __pyx_t_3 = __pyx_v_mn;
   22164          24 :     __pyx_t_1 = __pyx_t_3;
   22165          24 :     for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   22166          18 :       __pyx_v_ind1 = __pyx_t_2;
   22167             : 
   22168             :       /* "scipy/linalg/_decomp_lu_cython.pyx":98
   22169             :  *         for ind1 in range(m): perm[ind1] = ind1
   22170             :  *         for ind1 in range(mn):
   22171             :  *             tmp_int = perm[ipiv[ind1]-1]             # <<<<<<<<<<<<<<
   22172             :  *             perm[ipiv[ind1]-1] = perm[ind1]
   22173             :  *             perm[ind1] = tmp_int
   22174             :  */
   22175          18 :       __pyx_t_9 = ((__pyx_v_ipiv[__pyx_v_ind1]) - 1);
   22176          18 :       __pyx_v_tmp_int = (*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) )));
   22177             : 
   22178             :       /* "scipy/linalg/_decomp_lu_cython.pyx":99
   22179             :  *         for ind1 in range(mn):
   22180             :  *             tmp_int = perm[ipiv[ind1]-1]
   22181             :  *             perm[ipiv[ind1]-1] = perm[ind1]             # <<<<<<<<<<<<<<
   22182             :  *             perm[ind1] = tmp_int
   22183             :  * 
   22184             :  */
   22185          18 :       __pyx_t_9 = __pyx_v_ind1;
   22186          18 :       __pyx_t_10 = ((__pyx_v_ipiv[__pyx_v_ind1]) - 1);
   22187          18 :       *((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_10)) )) = (*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) )));
   22188             : 
   22189             :       /* "scipy/linalg/_decomp_lu_cython.pyx":100
   22190             :  *             tmp_int = perm[ipiv[ind1]-1]
   22191             :  *             perm[ipiv[ind1]-1] = perm[ind1]
   22192             :  *             perm[ind1] = tmp_int             # <<<<<<<<<<<<<<
   22193             :  * 
   22194             :  *         # convert iperm to perm into ipiv and store back into perm
   22195             :  */
   22196          18 :       __pyx_t_9 = __pyx_v_ind1;
   22197          18 :       *((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) )) = __pyx_v_tmp_int;
   22198             :     }
   22199             : 
   22200             :     /* "scipy/linalg/_decomp_lu_cython.pyx":104
   22201             :  *         # convert iperm to perm into ipiv and store back into perm
   22202             :  *         # as final. Solution without argsort : ipiv[perm] = np.arange(m)
   22203             :  *         for ind1 in range(m):             # <<<<<<<<<<<<<<
   22204             :  *             ipiv[perm[ind1]] = ind1
   22205             :  *         for ind1 in range(m):
   22206             :  */
   22207          24 :     __pyx_t_3 = __pyx_v_m;
   22208          24 :     __pyx_t_1 = __pyx_t_3;
   22209          24 :     for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   22210          18 :       __pyx_v_ind1 = __pyx_t_2;
   22211             : 
   22212             :       /* "scipy/linalg/_decomp_lu_cython.pyx":105
   22213             :  *         # as final. Solution without argsort : ipiv[perm] = np.arange(m)
   22214             :  *         for ind1 in range(m):
   22215             :  *             ipiv[perm[ind1]] = ind1             # <<<<<<<<<<<<<<
   22216             :  *         for ind1 in range(m):
   22217             :  *             perm[ind1] = ipiv[ind1]
   22218             :  */
   22219          18 :       __pyx_t_9 = __pyx_v_ind1;
   22220          18 :       (__pyx_v_ipiv[(*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) )))]) = __pyx_v_ind1;
   22221             :     }
   22222             : 
   22223             :     /* "scipy/linalg/_decomp_lu_cython.pyx":106
   22224             :  *         for ind1 in range(m):
   22225             :  *             ipiv[perm[ind1]] = ind1
   22226             :  *         for ind1 in range(m):             # <<<<<<<<<<<<<<
   22227             :  *             perm[ind1] = ipiv[ind1]
   22228             :  * 
   22229             :  */
   22230           6 :     __pyx_t_3 = __pyx_v_m;
   22231           6 :     __pyx_t_1 = __pyx_t_3;
   22232          24 :     for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   22233          18 :       __pyx_v_ind1 = __pyx_t_2;
   22234             : 
   22235             :       /* "scipy/linalg/_decomp_lu_cython.pyx":107
   22236             :  *             ipiv[perm[ind1]] = ind1
   22237             :  *         for ind1 in range(m):
   22238             :  *             perm[ind1] = ipiv[ind1]             # <<<<<<<<<<<<<<
   22239             :  * 
   22240             :  *     finally:
   22241             :  */
   22242          18 :       __pyx_t_9 = __pyx_v_ind1;
   22243          18 :       *((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) )) = (__pyx_v_ipiv[__pyx_v_ind1]);
   22244             :     }
   22245             :   }
   22246             : 
   22247             :   /* "scipy/linalg/_decomp_lu_cython.pyx":110
   22248             :  * 
   22249             :  *     finally:
   22250             :  *         PyMem_Free(ipiv)             # <<<<<<<<<<<<<<
   22251             :  * 
   22252             :  *     # Separation of L and U parts
   22253             :  */
   22254             :   /*finally:*/ {
   22255             :     /*normal exit:*/{
   22256           6 :       PyMem_Free(__pyx_v_ipiv);
   22257           6 :       goto __pyx_L7;
   22258             :     }
   22259           6 :     __pyx_L7:;
   22260             :   }
   22261             : 
   22262             :   /* "scipy/linalg/_decomp_lu_cython.pyx":114
   22263             :  *     # Separation of L and U parts
   22264             :  * 
   22265             :  *     if m > n:  # tall, "a" holds bigger L             # <<<<<<<<<<<<<<
   22266             :  *         # Extract upper right rectangle to lu
   22267             :  *         for ind1 in range(mn):  # rows
   22268             :  */
   22269           6 :   __pyx_t_4 = (__pyx_v_m > __pyx_v_n);
   22270           6 :   if (__pyx_t_4) {
   22271             : 
   22272             :     /* "scipy/linalg/_decomp_lu_cython.pyx":116
   22273             :  *     if m > n:  # tall, "a" holds bigger L
   22274             :  *         # Extract upper right rectangle to lu
   22275             :  *         for ind1 in range(mn):  # rows             # <<<<<<<<<<<<<<
   22276             :  *             lu[ind1, ind1:mn] = a[ind1, ind1:mn]
   22277             :  * 
   22278             :  */
   22279           0 :     __pyx_t_3 = __pyx_v_mn;
   22280           0 :     __pyx_t_1 = __pyx_t_3;
   22281           0 :     for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   22282           0 :       __pyx_v_ind1 = __pyx_t_2;
   22283             : 
   22284             :       /* "scipy/linalg/_decomp_lu_cython.pyx":117
   22285             :  *         # Extract upper right rectangle to lu
   22286             :  *         for ind1 in range(mn):  # rows
   22287             :  *             lu[ind1, ind1:mn] = a[ind1, ind1:mn]             # <<<<<<<<<<<<<<
   22288             :  * 
   22289             :  *         for ind1 in range(mn):
   22290             :  */
   22291           0 :       __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 117, __pyx_L1_error)
   22292           0 :       __Pyx_GOTREF(__pyx_t_5);
   22293           0 :       __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 117, __pyx_L1_error)
   22294           0 :       __Pyx_GOTREF(__pyx_t_8);
   22295           0 :       __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_mn); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 117, __pyx_L1_error)
   22296           0 :       __Pyx_GOTREF(__pyx_t_11);
   22297           0 :       __pyx_t_12 = PySlice_New(__pyx_t_8, __pyx_t_11, Py_None); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 117, __pyx_L1_error)
   22298           0 :       __Pyx_GOTREF(__pyx_t_12);
   22299           0 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   22300           0 :       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   22301           0 :       __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 117, __pyx_L1_error)
   22302           0 :       __Pyx_GOTREF(__pyx_t_11);
   22303           0 :       __Pyx_GIVEREF(__pyx_t_5);
   22304           0 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_5)) __PYX_ERR(0, 117, __pyx_L1_error);
   22305           0 :       __Pyx_GIVEREF(__pyx_t_12);
   22306           0 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_12)) __PYX_ERR(0, 117, __pyx_L1_error);
   22307           0 :       __pyx_t_5 = 0;
   22308           0 :       __pyx_t_12 = 0;
   22309           0 :       __pyx_t_12 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_a), __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 117, __pyx_L1_error)
   22310           0 :       __Pyx_GOTREF(__pyx_t_12);
   22311           0 :       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   22312           0 :       __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 117, __pyx_L1_error)
   22313           0 :       __Pyx_GOTREF(__pyx_t_11);
   22314           0 :       __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 117, __pyx_L1_error)
   22315           0 :       __Pyx_GOTREF(__pyx_t_5);
   22316           0 :       __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_mn); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 117, __pyx_L1_error)
   22317           0 :       __Pyx_GOTREF(__pyx_t_8);
   22318           0 :       __pyx_t_13 = PySlice_New(__pyx_t_5, __pyx_t_8, Py_None); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 117, __pyx_L1_error)
   22319           0 :       __Pyx_GOTREF(__pyx_t_13);
   22320           0 :       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   22321           0 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   22322           0 :       __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 117, __pyx_L1_error)
   22323           0 :       __Pyx_GOTREF(__pyx_t_8);
   22324           0 :       __Pyx_GIVEREF(__pyx_t_11);
   22325           0 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_11)) __PYX_ERR(0, 117, __pyx_L1_error);
   22326           0 :       __Pyx_GIVEREF(__pyx_t_13);
   22327           0 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_13)) __PYX_ERR(0, 117, __pyx_L1_error);
   22328           0 :       __pyx_t_11 = 0;
   22329           0 :       __pyx_t_13 = 0;
   22330           0 :       if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_lu), __pyx_t_8, __pyx_t_12) < 0))) __PYX_ERR(0, 117, __pyx_L1_error)
   22331           0 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   22332           0 :       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
   22333             :     }
   22334             : 
   22335             :     /* "scipy/linalg/_decomp_lu_cython.pyx":119
   22336             :  *             lu[ind1, ind1:mn] = a[ind1, ind1:mn]
   22337             :  * 
   22338             :  *         for ind1 in range(mn):             # <<<<<<<<<<<<<<
   22339             :  *             a[ind1, ind1] = 1
   22340             :  *             a[ind1, ind1+1:mn] = 0
   22341             :  */
   22342           0 :     __pyx_t_3 = __pyx_v_mn;
   22343           0 :     __pyx_t_1 = __pyx_t_3;
   22344           0 :     for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   22345           0 :       __pyx_v_ind1 = __pyx_t_2;
   22346             : 
   22347             :       /* "scipy/linalg/_decomp_lu_cython.pyx":120
   22348             :  * 
   22349             :  *         for ind1 in range(mn):
   22350             :  *             a[ind1, ind1] = 1             # <<<<<<<<<<<<<<
   22351             :  *             a[ind1, ind1+1:mn] = 0
   22352             :  * 
   22353             :  */
   22354           0 :       __pyx_t_9 = __pyx_v_ind1;
   22355           0 :       __pyx_t_10 = __pyx_v_ind1;
   22356           0 :       *__Pyx_BufPtrStrided2d(__pyx_t_float_complex *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_a.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_a.diminfo[1].strides) = __pyx_t_float_complex_from_parts(1, 0);
   22357             : 
   22358             :       /* "scipy/linalg/_decomp_lu_cython.pyx":121
   22359             :  *         for ind1 in range(mn):
   22360             :  *             a[ind1, ind1] = 1
   22361             :  *             a[ind1, ind1+1:mn] = 0             # <<<<<<<<<<<<<<
   22362             :  * 
   22363             :  *     else:  # square or fat, "a" holds bigger U
   22364             :  */
   22365           0 :       __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 121, __pyx_L1_error)
   22366           0 :       __Pyx_GOTREF(__pyx_t_12);
   22367           0 :       __pyx_t_8 = __Pyx_PyInt_From_long((__pyx_v_ind1 + 1)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 121, __pyx_L1_error)
   22368           0 :       __Pyx_GOTREF(__pyx_t_8);
   22369           0 :       __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_mn); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 121, __pyx_L1_error)
   22370           0 :       __Pyx_GOTREF(__pyx_t_13);
   22371           0 :       __pyx_t_11 = PySlice_New(__pyx_t_8, __pyx_t_13, Py_None); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 121, __pyx_L1_error)
   22372           0 :       __Pyx_GOTREF(__pyx_t_11);
   22373           0 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   22374           0 :       __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   22375           0 :       __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 121, __pyx_L1_error)
   22376           0 :       __Pyx_GOTREF(__pyx_t_13);
   22377           0 :       __Pyx_GIVEREF(__pyx_t_12);
   22378           0 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12)) __PYX_ERR(0, 121, __pyx_L1_error);
   22379           0 :       __Pyx_GIVEREF(__pyx_t_11);
   22380           0 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_11)) __PYX_ERR(0, 121, __pyx_L1_error);
   22381           0 :       __pyx_t_12 = 0;
   22382           0 :       __pyx_t_11 = 0;
   22383           0 :       if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_a), __pyx_t_13, __pyx_int_0) < 0))) __PYX_ERR(0, 121, __pyx_L1_error)
   22384           0 :       __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   22385             :     }
   22386             : 
   22387             :     /* "scipy/linalg/_decomp_lu_cython.pyx":114
   22388             :  *     # Separation of L and U parts
   22389             :  * 
   22390             :  *     if m > n:  # tall, "a" holds bigger L             # <<<<<<<<<<<<<<
   22391             :  *         # Extract upper right rectangle to lu
   22392             :  *         for ind1 in range(mn):  # rows
   22393             :  */
   22394           0 :     goto __pyx_L16;
   22395             :   }
   22396             : 
   22397             :   /* "scipy/linalg/_decomp_lu_cython.pyx":125
   22398             :  *     else:  # square or fat, "a" holds bigger U
   22399             :  * 
   22400             :  *         lu[0, 0] = 1             # <<<<<<<<<<<<<<
   22401             :  *         for ind1 in range(1, mn):  # rows
   22402             :  *             lu[ind1, :ind1] = a[ind1, :ind1]
   22403             :  */
   22404             :   /*else*/ {
   22405           6 :     __pyx_t_10 = 0;
   22406           6 :     __pyx_t_9 = 0;
   22407           6 :     *__Pyx_BufPtrStrided2d(__pyx_t_float_complex *, __pyx_pybuffernd_lu.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_lu.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_lu.diminfo[1].strides) = __pyx_t_float_complex_from_parts(1, 0);
   22408             : 
   22409             :     /* "scipy/linalg/_decomp_lu_cython.pyx":126
   22410             :  * 
   22411             :  *         lu[0, 0] = 1
   22412             :  *         for ind1 in range(1, mn):  # rows             # <<<<<<<<<<<<<<
   22413             :  *             lu[ind1, :ind1] = a[ind1, :ind1]
   22414             :  *             lu[ind1, ind1] = 1
   22415             :  */
   22416           6 :     __pyx_t_3 = __pyx_v_mn;
   22417           6 :     __pyx_t_1 = __pyx_t_3;
   22418          18 :     for (__pyx_t_2 = 1; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   22419          12 :       __pyx_v_ind1 = __pyx_t_2;
   22420             : 
   22421             :       /* "scipy/linalg/_decomp_lu_cython.pyx":127
   22422             :  *         lu[0, 0] = 1
   22423             :  *         for ind1 in range(1, mn):  # rows
   22424             :  *             lu[ind1, :ind1] = a[ind1, :ind1]             # <<<<<<<<<<<<<<
   22425             :  *             lu[ind1, ind1] = 1
   22426             :  * 
   22427             :  */
   22428          12 :       __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 127, __pyx_L1_error)
   22429          12 :       __Pyx_GOTREF(__pyx_t_13);
   22430          12 :       __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 127, __pyx_L1_error)
   22431          12 :       __Pyx_GOTREF(__pyx_t_11);
   22432          12 :       __pyx_t_12 = PySlice_New(Py_None, __pyx_t_11, Py_None); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 127, __pyx_L1_error)
   22433          12 :       __Pyx_GOTREF(__pyx_t_12);
   22434          12 :       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   22435          12 :       __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 127, __pyx_L1_error)
   22436          12 :       __Pyx_GOTREF(__pyx_t_11);
   22437          12 :       __Pyx_GIVEREF(__pyx_t_13);
   22438          12 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13)) __PYX_ERR(0, 127, __pyx_L1_error);
   22439          12 :       __Pyx_GIVEREF(__pyx_t_12);
   22440          12 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_12)) __PYX_ERR(0, 127, __pyx_L1_error);
   22441          12 :       __pyx_t_13 = 0;
   22442          12 :       __pyx_t_12 = 0;
   22443          12 :       __pyx_t_12 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_a), __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 127, __pyx_L1_error)
   22444          12 :       __Pyx_GOTREF(__pyx_t_12);
   22445          12 :       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   22446          12 :       __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 127, __pyx_L1_error)
   22447          12 :       __Pyx_GOTREF(__pyx_t_11);
   22448          12 :       __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 127, __pyx_L1_error)
   22449          12 :       __Pyx_GOTREF(__pyx_t_13);
   22450          12 :       __pyx_t_8 = PySlice_New(Py_None, __pyx_t_13, Py_None); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 127, __pyx_L1_error)
   22451          12 :       __Pyx_GOTREF(__pyx_t_8);
   22452          12 :       __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   22453          12 :       __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 127, __pyx_L1_error)
   22454          12 :       __Pyx_GOTREF(__pyx_t_13);
   22455          12 :       __Pyx_GIVEREF(__pyx_t_11);
   22456          12 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_11)) __PYX_ERR(0, 127, __pyx_L1_error);
   22457          12 :       __Pyx_GIVEREF(__pyx_t_8);
   22458          12 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_8)) __PYX_ERR(0, 127, __pyx_L1_error);
   22459          12 :       __pyx_t_11 = 0;
   22460          12 :       __pyx_t_8 = 0;
   22461          12 :       if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_lu), __pyx_t_13, __pyx_t_12) < 0))) __PYX_ERR(0, 127, __pyx_L1_error)
   22462          12 :       __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   22463          12 :       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
   22464             : 
   22465             :       /* "scipy/linalg/_decomp_lu_cython.pyx":128
   22466             :  *         for ind1 in range(1, mn):  # rows
   22467             :  *             lu[ind1, :ind1] = a[ind1, :ind1]
   22468             :  *             lu[ind1, ind1] = 1             # <<<<<<<<<<<<<<
   22469             :  * 
   22470             :  *         for ind2 in range(mn - 1):  # cols
   22471             :  */
   22472          12 :       __pyx_t_9 = __pyx_v_ind1;
   22473          12 :       __pyx_t_10 = __pyx_v_ind1;
   22474          12 :       *__Pyx_BufPtrStrided2d(__pyx_t_float_complex *, __pyx_pybuffernd_lu.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_lu.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_lu.diminfo[1].strides) = __pyx_t_float_complex_from_parts(1, 0);
   22475             :     }
   22476             : 
   22477             :     /* "scipy/linalg/_decomp_lu_cython.pyx":130
   22478             :  *             lu[ind1, ind1] = 1
   22479             :  * 
   22480             :  *         for ind2 in range(mn - 1):  # cols             # <<<<<<<<<<<<<<
   22481             :  *             for ind1 in range(ind2+1, m):  # rows
   22482             :  *                 a[ind1, ind2] = 0
   22483             :  */
   22484           6 :     __pyx_t_14 = (__pyx_v_mn - 1);
   22485           6 :     __pyx_t_15 = __pyx_t_14;
   22486          18 :     for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_15; __pyx_t_3+=1) {
   22487          12 :       __pyx_v_ind2 = __pyx_t_3;
   22488             : 
   22489             :       /* "scipy/linalg/_decomp_lu_cython.pyx":131
   22490             :  * 
   22491             :  *         for ind2 in range(mn - 1):  # cols
   22492             :  *             for ind1 in range(ind2+1, m):  # rows             # <<<<<<<<<<<<<<
   22493             :  *                 a[ind1, ind2] = 0
   22494             :  * 
   22495             :  */
   22496          12 :       __pyx_t_1 = __pyx_v_m;
   22497          12 :       __pyx_t_2 = __pyx_t_1;
   22498          30 :       for (__pyx_t_16 = (__pyx_v_ind2 + 1); __pyx_t_16 < __pyx_t_2; __pyx_t_16+=1) {
   22499          18 :         __pyx_v_ind1 = __pyx_t_16;
   22500             : 
   22501             :         /* "scipy/linalg/_decomp_lu_cython.pyx":132
   22502             :  *         for ind2 in range(mn - 1):  # cols
   22503             :  *             for ind1 in range(ind2+1, m):  # rows
   22504             :  *                 a[ind1, ind2] = 0             # <<<<<<<<<<<<<<
   22505             :  * 
   22506             :  *     if permute_l:
   22507             :  */
   22508          18 :         __pyx_t_10 = __pyx_v_ind1;
   22509          18 :         __pyx_t_9 = __pyx_v_ind2;
   22510          18 :         *__Pyx_BufPtrStrided2d(__pyx_t_float_complex *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_a.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_a.diminfo[1].strides) = __pyx_t_float_complex_from_parts(0, 0);
   22511             :       }
   22512             :     }
   22513             :   }
   22514           6 :   __pyx_L16:;
   22515             : 
   22516             :   /* "scipy/linalg/_decomp_lu_cython.pyx":134
   22517             :  *                 a[ind1, ind2] = 0
   22518             :  * 
   22519             :  *     if permute_l:             # <<<<<<<<<<<<<<
   22520             :  *         # b still exists -> use it as temp array
   22521             :  *         # we copy everything to b and pick back
   22522             :  */
   22523           6 :   if (__pyx_v_permute_l) {
   22524             : 
   22525             :     /* "scipy/linalg/_decomp_lu_cython.pyx":139
   22526             :  *         # rows from b as dictated by perm
   22527             :  * 
   22528             :  *         if m > n:             # <<<<<<<<<<<<<<
   22529             :  *             b[:, :] = a[:, :]
   22530             :  *             # memcpy(bb, &a[0, 0], m*mn*sizeof(lapack_t))
   22531             :  */
   22532           0 :     __pyx_t_4 = (__pyx_v_m > __pyx_v_n);
   22533           0 :     if (__pyx_t_4) {
   22534             : 
   22535             :       /* "scipy/linalg/_decomp_lu_cython.pyx":140
   22536             :  * 
   22537             :  *         if m > n:
   22538             :  *             b[:, :] = a[:, :]             # <<<<<<<<<<<<<<
   22539             :  *             # memcpy(bb, &a[0, 0], m*mn*sizeof(lapack_t))
   22540             :  *             for ind1 in range(m):
   22541             :  */
   22542           0 :       __pyx_t_12 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_a), __pyx_tuple__38); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 140, __pyx_L1_error)
   22543           0 :       __Pyx_GOTREF(__pyx_t_12);
   22544           0 :       if (unlikely((PyObject_SetItem(__pyx_v_b, __pyx_tuple__41, __pyx_t_12) < 0))) __PYX_ERR(0, 140, __pyx_L1_error)
   22545           0 :       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
   22546             : 
   22547             :       /* "scipy/linalg/_decomp_lu_cython.pyx":142
   22548             :  *             b[:, :] = a[:, :]
   22549             :  *             # memcpy(bb, &a[0, 0], m*mn*sizeof(lapack_t))
   22550             :  *             for ind1 in range(m):             # <<<<<<<<<<<<<<
   22551             :  *                 if perm[ind1] == ind1:
   22552             :  *                     continue
   22553             :  */
   22554           0 :       __pyx_t_3 = __pyx_v_m;
   22555           0 :       __pyx_t_1 = __pyx_t_3;
   22556           0 :       for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   22557           0 :         __pyx_v_ind1 = __pyx_t_2;
   22558             : 
   22559             :         /* "scipy/linalg/_decomp_lu_cython.pyx":143
   22560             :  *             # memcpy(bb, &a[0, 0], m*mn*sizeof(lapack_t))
   22561             :  *             for ind1 in range(m):
   22562             :  *                 if perm[ind1] == ind1:             # <<<<<<<<<<<<<<
   22563             :  *                     continue
   22564             :  *                 else:
   22565             :  */
   22566           0 :         __pyx_t_9 = __pyx_v_ind1;
   22567           0 :         __pyx_t_4 = ((*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) ))) == __pyx_v_ind1);
   22568           0 :         if (__pyx_t_4) {
   22569             : 
   22570             :           /* "scipy/linalg/_decomp_lu_cython.pyx":144
   22571             :  *             for ind1 in range(m):
   22572             :  *                 if perm[ind1] == ind1:
   22573             :  *                     continue             # <<<<<<<<<<<<<<
   22574             :  *                 else:
   22575             :  *                     a[ind1, :] = b[perm[ind1], :]
   22576             :  */
   22577           0 :           goto __pyx_L29_continue;
   22578             : 
   22579             :           /* "scipy/linalg/_decomp_lu_cython.pyx":143
   22580             :  *             # memcpy(bb, &a[0, 0], m*mn*sizeof(lapack_t))
   22581             :  *             for ind1 in range(m):
   22582             :  *                 if perm[ind1] == ind1:             # <<<<<<<<<<<<<<
   22583             :  *                     continue
   22584             :  *                 else:
   22585             :  */
   22586             :         }
   22587             : 
   22588             :         /* "scipy/linalg/_decomp_lu_cython.pyx":146
   22589             :  *                     continue
   22590             :  *                 else:
   22591             :  *                     a[ind1, :] = b[perm[ind1], :]             # <<<<<<<<<<<<<<
   22592             :  * 
   22593             :  *         else:  # same but for lu array
   22594             :  */
   22595             :         /*else*/ {
   22596           0 :           __pyx_t_9 = __pyx_v_ind1;
   22597           0 :           __pyx_t_12 = __Pyx_PyInt_From_int((*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) )))); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 146, __pyx_L1_error)
   22598           0 :           __Pyx_GOTREF(__pyx_t_12);
   22599           0 :           __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 146, __pyx_L1_error)
   22600           0 :           __Pyx_GOTREF(__pyx_t_13);
   22601           0 :           __Pyx_GIVEREF(__pyx_t_12);
   22602           0 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12)) __PYX_ERR(0, 146, __pyx_L1_error);
   22603           0 :           __Pyx_INCREF(__pyx_slice__42);
   22604           0 :           __Pyx_GIVEREF(__pyx_slice__42);
   22605           0 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_slice__42)) __PYX_ERR(0, 146, __pyx_L1_error);
   22606           0 :           __pyx_t_12 = 0;
   22607           0 :           __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_v_b, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 146, __pyx_L1_error)
   22608           0 :           __Pyx_GOTREF(__pyx_t_12);
   22609           0 :           __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   22610           0 :           __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 146, __pyx_L1_error)
   22611           0 :           __Pyx_GOTREF(__pyx_t_13);
   22612           0 :           __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 146, __pyx_L1_error)
   22613           0 :           __Pyx_GOTREF(__pyx_t_8);
   22614           0 :           __Pyx_GIVEREF(__pyx_t_13);
   22615           0 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_13)) __PYX_ERR(0, 146, __pyx_L1_error);
   22616           0 :           __Pyx_INCREF(__pyx_slice__43);
   22617           0 :           __Pyx_GIVEREF(__pyx_slice__43);
   22618           0 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_slice__43)) __PYX_ERR(0, 146, __pyx_L1_error);
   22619           0 :           __pyx_t_13 = 0;
   22620           0 :           if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_a), __pyx_t_8, __pyx_t_12) < 0))) __PYX_ERR(0, 146, __pyx_L1_error)
   22621           0 :           __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   22622           0 :           __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
   22623             :         }
   22624           0 :         __pyx_L29_continue:;
   22625             :       }
   22626             : 
   22627             :       /* "scipy/linalg/_decomp_lu_cython.pyx":139
   22628             :  *         # rows from b as dictated by perm
   22629             :  * 
   22630             :  *         if m > n:             # <<<<<<<<<<<<<<
   22631             :  *             b[:, :] = a[:, :]
   22632             :  *             # memcpy(bb, &a[0, 0], m*mn*sizeof(lapack_t))
   22633             :  */
   22634           0 :       goto __pyx_L28;
   22635             :     }
   22636             : 
   22637             :     /* "scipy/linalg/_decomp_lu_cython.pyx":149
   22638             :  * 
   22639             :  *         else:  # same but for lu array
   22640             :  *             b[:mn, :mn] = lu[:, :]             # <<<<<<<<<<<<<<
   22641             :  *             # memcpy(bb, &lu[0, 0], mn*n*sizeof(lapack_t))
   22642             :  *             for ind1 in range(mn):
   22643             :  */
   22644             :     /*else*/ {
   22645           0 :       __pyx_t_12 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_lu), __pyx_tuple__46); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 149, __pyx_L1_error)
   22646           0 :       __Pyx_GOTREF(__pyx_t_12);
   22647           0 :       __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_mn); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 149, __pyx_L1_error)
   22648           0 :       __Pyx_GOTREF(__pyx_t_8);
   22649           0 :       __pyx_t_13 = PySlice_New(Py_None, __pyx_t_8, Py_None); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 149, __pyx_L1_error)
   22650           0 :       __Pyx_GOTREF(__pyx_t_13);
   22651           0 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   22652           0 :       __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_mn); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 149, __pyx_L1_error)
   22653           0 :       __Pyx_GOTREF(__pyx_t_8);
   22654           0 :       __pyx_t_11 = PySlice_New(Py_None, __pyx_t_8, Py_None); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 149, __pyx_L1_error)
   22655           0 :       __Pyx_GOTREF(__pyx_t_11);
   22656           0 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   22657           0 :       __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 149, __pyx_L1_error)
   22658           0 :       __Pyx_GOTREF(__pyx_t_8);
   22659           0 :       __Pyx_GIVEREF(__pyx_t_13);
   22660           0 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_13)) __PYX_ERR(0, 149, __pyx_L1_error);
   22661           0 :       __Pyx_GIVEREF(__pyx_t_11);
   22662           0 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_11)) __PYX_ERR(0, 149, __pyx_L1_error);
   22663           0 :       __pyx_t_13 = 0;
   22664           0 :       __pyx_t_11 = 0;
   22665           0 :       if (unlikely((PyObject_SetItem(__pyx_v_b, __pyx_t_8, __pyx_t_12) < 0))) __PYX_ERR(0, 149, __pyx_L1_error)
   22666           0 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   22667           0 :       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
   22668             : 
   22669             :       /* "scipy/linalg/_decomp_lu_cython.pyx":151
   22670             :  *             b[:mn, :mn] = lu[:, :]
   22671             :  *             # memcpy(bb, &lu[0, 0], mn*n*sizeof(lapack_t))
   22672             :  *             for ind1 in range(mn):             # <<<<<<<<<<<<<<
   22673             :  *                 if perm[ind1] == ind1:
   22674             :  *                     continue
   22675             :  */
   22676           0 :       __pyx_t_3 = __pyx_v_mn;
   22677           0 :       __pyx_t_1 = __pyx_t_3;
   22678           0 :       for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   22679           0 :         __pyx_v_ind1 = __pyx_t_2;
   22680             : 
   22681             :         /* "scipy/linalg/_decomp_lu_cython.pyx":152
   22682             :  *             # memcpy(bb, &lu[0, 0], mn*n*sizeof(lapack_t))
   22683             :  *             for ind1 in range(mn):
   22684             :  *                 if perm[ind1] == ind1:             # <<<<<<<<<<<<<<
   22685             :  *                     continue
   22686             :  *                 else:
   22687             :  */
   22688           0 :         __pyx_t_9 = __pyx_v_ind1;
   22689           0 :         __pyx_t_4 = ((*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) ))) == __pyx_v_ind1);
   22690           0 :         if (__pyx_t_4) {
   22691             : 
   22692             :           /* "scipy/linalg/_decomp_lu_cython.pyx":153
   22693             :  *             for ind1 in range(mn):
   22694             :  *                 if perm[ind1] == ind1:
   22695             :  *                     continue             # <<<<<<<<<<<<<<
   22696             :  *                 else:
   22697             :  *                     lu[ind1, :] = b[perm[ind1], :mn]
   22698             :  */
   22699           0 :           goto __pyx_L32_continue;
   22700             : 
   22701             :           /* "scipy/linalg/_decomp_lu_cython.pyx":152
   22702             :  *             # memcpy(bb, &lu[0, 0], mn*n*sizeof(lapack_t))
   22703             :  *             for ind1 in range(mn):
   22704             :  *                 if perm[ind1] == ind1:             # <<<<<<<<<<<<<<
   22705             :  *                     continue
   22706             :  *                 else:
   22707             :  */
   22708             :         }
   22709             : 
   22710             :         /* "scipy/linalg/_decomp_lu_cython.pyx":155
   22711             :  *                     continue
   22712             :  *                 else:
   22713             :  *                     lu[ind1, :] = b[perm[ind1], :mn]             # <<<<<<<<<<<<<<
   22714             :  * 
   22715             :  * 
   22716             :  */
   22717             :         /*else*/ {
   22718           0 :           __pyx_t_9 = __pyx_v_ind1;
   22719           0 :           __pyx_t_12 = __Pyx_PyInt_From_int((*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) )))); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 155, __pyx_L1_error)
   22720           0 :           __Pyx_GOTREF(__pyx_t_12);
   22721           0 :           __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_mn); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 155, __pyx_L1_error)
   22722           0 :           __Pyx_GOTREF(__pyx_t_8);
   22723           0 :           __pyx_t_11 = PySlice_New(Py_None, __pyx_t_8, Py_None); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 155, __pyx_L1_error)
   22724           0 :           __Pyx_GOTREF(__pyx_t_11);
   22725           0 :           __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   22726           0 :           __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 155, __pyx_L1_error)
   22727           0 :           __Pyx_GOTREF(__pyx_t_8);
   22728           0 :           __Pyx_GIVEREF(__pyx_t_12);
   22729           0 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_12)) __PYX_ERR(0, 155, __pyx_L1_error);
   22730           0 :           __Pyx_GIVEREF(__pyx_t_11);
   22731           0 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_11)) __PYX_ERR(0, 155, __pyx_L1_error);
   22732           0 :           __pyx_t_12 = 0;
   22733           0 :           __pyx_t_11 = 0;
   22734           0 :           __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_v_b, __pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 155, __pyx_L1_error)
   22735           0 :           __Pyx_GOTREF(__pyx_t_11);
   22736           0 :           __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   22737           0 :           __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 155, __pyx_L1_error)
   22738           0 :           __Pyx_GOTREF(__pyx_t_8);
   22739           0 :           __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 155, __pyx_L1_error)
   22740           0 :           __Pyx_GOTREF(__pyx_t_12);
   22741           0 :           __Pyx_GIVEREF(__pyx_t_8);
   22742           0 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_8)) __PYX_ERR(0, 155, __pyx_L1_error);
   22743           0 :           __Pyx_INCREF(__pyx_slice__47);
   22744           0 :           __Pyx_GIVEREF(__pyx_slice__47);
   22745           0 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_slice__47)) __PYX_ERR(0, 155, __pyx_L1_error);
   22746           0 :           __pyx_t_8 = 0;
   22747           0 :           if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_lu), __pyx_t_12, __pyx_t_11) < 0))) __PYX_ERR(0, 155, __pyx_L1_error)
   22748           0 :           __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
   22749           0 :           __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   22750             :         }
   22751           0 :         __pyx_L32_continue:;
   22752             :       }
   22753             :     }
   22754           0 :     __pyx_L28:;
   22755             : 
   22756             :     /* "scipy/linalg/_decomp_lu_cython.pyx":134
   22757             :  *                 a[ind1, ind2] = 0
   22758             :  * 
   22759             :  *     if permute_l:             # <<<<<<<<<<<<<<
   22760             :  *         # b still exists -> use it as temp array
   22761             :  *         # we copy everything to b and pick back
   22762             :  */
   22763             :   }
   22764             : 
   22765             :   /* "scipy/linalg/_decomp_lu_cython.pyx":22
   22766             :  * @cython.boundscheck(False)
   22767             :  * @cython.initializedcheck(False)
   22768             :  * cdef void lu_decompose(cnp.ndarray[lapack_t, ndim=2] a,             # <<<<<<<<<<<<<<
   22769             :  *                        cnp.ndarray[lapack_t, ndim=2] lu,
   22770             :  *                        int[::1] perm,
   22771             :  */
   22772             : 
   22773             :   /* function exit code */
   22774           6 :   goto __pyx_L0;
   22775           0 :   __pyx_L1_error:;
   22776           0 :   __Pyx_XDECREF(__pyx_t_5);
   22777           0 :   __Pyx_XDECREF(__pyx_t_8);
   22778           0 :   __Pyx_XDECREF(__pyx_t_11);
   22779           0 :   __Pyx_XDECREF(__pyx_t_12);
   22780           0 :   __Pyx_XDECREF(__pyx_t_13);
   22781           0 :   { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
   22782           0 :     __Pyx_PyThreadState_declare
   22783           0 :     __Pyx_PyThreadState_assign
   22784           0 :     __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
   22785           0 :     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a.rcbuffer->pybuffer);
   22786           0 :     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lu.rcbuffer->pybuffer);
   22787           0 :   __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
   22788           0 :   __Pyx_WriteUnraisable("scipy.linalg._decomp_lu_cython.lu_decompose", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
   22789           0 :   goto __pyx_L2;
   22790           6 :   __pyx_L0:;
   22791           6 :   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a.rcbuffer->pybuffer);
   22792           6 :   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lu.rcbuffer->pybuffer);
   22793           6 :   __pyx_L2:;
   22794           6 :   __Pyx_XDECREF(__pyx_v_b);
   22795           6 :   __Pyx_RefNannyFinishContext();
   22796           6 : }
   22797             : 
   22798          34 : static void __pyx_fuse_3__pyx_f_5scipy_6linalg_17_decomp_lu_cython_lu_decompose(PyArrayObject *__pyx_v_a, PyArrayObject *__pyx_v_lu, __Pyx_memviewslice __pyx_v_perm, int __pyx_v_permute_l) {
   22799          34 :   int __pyx_v_m;
   22800          34 :   int __pyx_v_n;
   22801          34 :   int __pyx_v_mn;
   22802          34 :   npy_intp __pyx_v_dims[2];
   22803          34 :   int __pyx_v_info;
   22804          34 :   int __pyx_v_ind1;
   22805          34 :   int __pyx_v_ind2;
   22806          34 :   int __pyx_v_tmp_int;
   22807          34 :   __pyx_t_double_complex *__pyx_v_aa;
   22808          34 :   __pyx_t_double_complex *__pyx_v_bb;
   22809          34 :   int *__pyx_v_ipiv;
   22810          34 :   PyObject *__pyx_v_b = NULL;
   22811          34 :   __Pyx_LocalBuf_ND __pyx_pybuffernd_a;
   22812          34 :   __Pyx_Buffer __pyx_pybuffer_a;
   22813          34 :   __Pyx_LocalBuf_ND __pyx_pybuffernd_lu;
   22814          34 :   __Pyx_Buffer __pyx_pybuffer_lu;
   22815             :   __Pyx_RefNannyDeclarations
   22816          34 :   int __pyx_t_1;
   22817          34 :   int __pyx_t_2;
   22818          34 :   int __pyx_t_3;
   22819          34 :   int __pyx_t_4;
   22820          34 :   PyObject *__pyx_t_5 = NULL;
   22821          34 :   Py_ssize_t __pyx_t_6;
   22822          34 :   Py_UCS4 __pyx_t_7;
   22823          34 :   PyObject *__pyx_t_8 = NULL;
   22824          34 :   Py_ssize_t __pyx_t_9;
   22825          34 :   Py_ssize_t __pyx_t_10;
   22826          34 :   PyObject *__pyx_t_11 = NULL;
   22827          34 :   PyObject *__pyx_t_12 = NULL;
   22828          34 :   PyObject *__pyx_t_13 = NULL;
   22829          34 :   long __pyx_t_14;
   22830          34 :   long __pyx_t_15;
   22831          34 :   int __pyx_t_16;
   22832          34 :   int __pyx_lineno = 0;
   22833          34 :   const char *__pyx_filename = NULL;
   22834          34 :   int __pyx_clineno = 0;
   22835          34 :   __Pyx_RefNannySetupContext("__pyx_fuse_3lu_decompose", 1);
   22836          34 :   __pyx_pybuffer_a.pybuffer.buf = NULL;
   22837          34 :   __pyx_pybuffer_a.refcount = 0;
   22838          34 :   __pyx_pybuffernd_a.data = NULL;
   22839          34 :   __pyx_pybuffernd_a.rcbuffer = &__pyx_pybuffer_a;
   22840          34 :   __pyx_pybuffer_lu.pybuffer.buf = NULL;
   22841          34 :   __pyx_pybuffer_lu.refcount = 0;
   22842          34 :   __pyx_pybuffernd_lu.data = NULL;
   22843          34 :   __pyx_pybuffernd_lu.rcbuffer = &__pyx_pybuffer_lu;
   22844             :   {
   22845          34 :     __Pyx_BufFmt_StackElem __pyx_stack[1];
   22846          34 :     if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_a.rcbuffer->pybuffer, (PyObject*)__pyx_v_a, &__Pyx_TypeInfo___pyx_t_double_complex, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 22, __pyx_L1_error)
   22847             :   }
   22848          34 :   __pyx_pybuffernd_a.diminfo[0].strides = __pyx_pybuffernd_a.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_a.diminfo[0].shape = __pyx_pybuffernd_a.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_a.diminfo[1].strides = __pyx_pybuffernd_a.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_a.diminfo[1].shape = __pyx_pybuffernd_a.rcbuffer->pybuffer.shape[1];
   22849             :   {
   22850          34 :     __Pyx_BufFmt_StackElem __pyx_stack[1];
   22851          34 :     if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_lu.rcbuffer->pybuffer, (PyObject*)__pyx_v_lu, &__Pyx_TypeInfo___pyx_t_double_complex, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) __PYX_ERR(0, 22, __pyx_L1_error)
   22852             :   }
   22853          34 :   __pyx_pybuffernd_lu.diminfo[0].strides = __pyx_pybuffernd_lu.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_lu.diminfo[0].shape = __pyx_pybuffernd_lu.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_lu.diminfo[1].strides = __pyx_pybuffernd_lu.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_lu.diminfo[1].shape = __pyx_pybuffernd_lu.rcbuffer->pybuffer.shape[1];
   22854             : 
   22855             :   /* "scipy/linalg/_decomp_lu_cython.pyx":50
   22856             :  * 
   22857             :  *     """
   22858             :  *     cdef int m = a.shape[0], n = a.shape[1], mn = min(m, n)             # <<<<<<<<<<<<<<
   22859             :  *     cdef cnp.npy_intp dims[2]
   22860             :  *     cdef int info = 0, ind1, ind2, tmp_int
   22861             :  */
   22862          34 :   __pyx_v_m = (__pyx_f_5numpy_7ndarray_5shape_shape(((PyArrayObject *)__pyx_v_a))[0]);
   22863          34 :   __pyx_v_n = (__pyx_f_5numpy_7ndarray_5shape_shape(((PyArrayObject *)__pyx_v_a))[1]);
   22864          34 :   __pyx_t_1 = __pyx_v_n;
   22865          34 :   __pyx_t_2 = __pyx_v_m;
   22866          34 :   __pyx_t_4 = (__pyx_t_1 < __pyx_t_2);
   22867          34 :   if (__pyx_t_4) {
   22868             :     __pyx_t_3 = __pyx_t_1;
   22869             :   } else {
   22870             :     __pyx_t_3 = __pyx_t_2;
   22871             :   }
   22872          34 :   __pyx_v_mn = __pyx_t_3;
   22873             : 
   22874             :   /* "scipy/linalg/_decomp_lu_cython.pyx":52
   22875             :  *     cdef int m = a.shape[0], n = a.shape[1], mn = min(m, n)
   22876             :  *     cdef cnp.npy_intp dims[2]
   22877             :  *     cdef int info = 0, ind1, ind2, tmp_int             # <<<<<<<<<<<<<<
   22878             :  *     cdef lapack_t *aa = <lapack_t *>cnp.PyArray_DATA(a)
   22879             :  *     cdef lapack_t *bb
   22880             :  */
   22881          34 :   __pyx_v_info = 0;
   22882             : 
   22883             :   /* "scipy/linalg/_decomp_lu_cython.pyx":53
   22884             :  *     cdef cnp.npy_intp dims[2]
   22885             :  *     cdef int info = 0, ind1, ind2, tmp_int
   22886             :  *     cdef lapack_t *aa = <lapack_t *>cnp.PyArray_DATA(a)             # <<<<<<<<<<<<<<
   22887             :  *     cdef lapack_t *bb
   22888             :  *     cdef int *ipiv = <int*>PyMem_Malloc(m * sizeof(int))
   22889             :  */
   22890          34 :   __pyx_v_aa = ((__pyx_t_double_complex *)PyArray_DATA(((PyArrayObject *)__pyx_v_a)));
   22891             : 
   22892             :   /* "scipy/linalg/_decomp_lu_cython.pyx":55
   22893             :  *     cdef lapack_t *aa = <lapack_t *>cnp.PyArray_DATA(a)
   22894             :  *     cdef lapack_t *bb
   22895             :  *     cdef int *ipiv = <int*>PyMem_Malloc(m * sizeof(int))             # <<<<<<<<<<<<<<
   22896             :  *     if not ipiv:
   22897             :  *         raise MemoryError('scipy.linalg.lu failed to allocate '
   22898             :  */
   22899          34 :   __pyx_v_ipiv = ((int *)PyMem_Malloc((__pyx_v_m * (sizeof(int)))));
   22900             : 
   22901             :   /* "scipy/linalg/_decomp_lu_cython.pyx":56
   22902             :  *     cdef lapack_t *bb
   22903             :  *     cdef int *ipiv = <int*>PyMem_Malloc(m * sizeof(int))
   22904             :  *     if not ipiv:             # <<<<<<<<<<<<<<
   22905             :  *         raise MemoryError('scipy.linalg.lu failed to allocate '
   22906             :  *                           'required memory.')
   22907             :  */
   22908          34 :   __pyx_t_4 = (!(__pyx_v_ipiv != 0));
   22909          34 :   if (unlikely(__pyx_t_4)) {
   22910             : 
   22911             :     /* "scipy/linalg/_decomp_lu_cython.pyx":57
   22912             :  *     cdef int *ipiv = <int*>PyMem_Malloc(m * sizeof(int))
   22913             :  *     if not ipiv:
   22914             :  *         raise MemoryError('scipy.linalg.lu failed to allocate '             # <<<<<<<<<<<<<<
   22915             :  *                           'required memory.')
   22916             :  *     dims[0] = m
   22917             :  */
   22918           0 :     __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 57, __pyx_L1_error)
   22919           0 :     __Pyx_GOTREF(__pyx_t_5);
   22920           0 :     __Pyx_Raise(__pyx_t_5, 0, 0, 0);
   22921           0 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   22922           0 :     __PYX_ERR(0, 57, __pyx_L1_error)
   22923             : 
   22924             :     /* "scipy/linalg/_decomp_lu_cython.pyx":56
   22925             :  *     cdef lapack_t *bb
   22926             :  *     cdef int *ipiv = <int*>PyMem_Malloc(m * sizeof(int))
   22927             :  *     if not ipiv:             # <<<<<<<<<<<<<<
   22928             :  *         raise MemoryError('scipy.linalg.lu failed to allocate '
   22929             :  *                           'required memory.')
   22930             :  */
   22931             :   }
   22932             : 
   22933             :   /* "scipy/linalg/_decomp_lu_cython.pyx":59
   22934             :  *         raise MemoryError('scipy.linalg.lu failed to allocate '
   22935             :  *                           'required memory.')
   22936             :  *     dims[0] = m             # <<<<<<<<<<<<<<
   22937             :  *     dims[1] = n
   22938             :  * 
   22939             :  */
   22940          34 :   (__pyx_v_dims[0]) = __pyx_v_m;
   22941             : 
   22942             :   /* "scipy/linalg/_decomp_lu_cython.pyx":60
   22943             :  *                           'required memory.')
   22944             :  *     dims[0] = m
   22945             :  *     dims[1] = n             # <<<<<<<<<<<<<<
   22946             :  * 
   22947             :  *     if lapack_t is cnp.float32_t:
   22948             :  */
   22949          34 :   (__pyx_v_dims[1]) = __pyx_v_n;
   22950             : 
   22951             :   /* "scipy/linalg/_decomp_lu_cython.pyx":78
   22952             :  *         cgetrf(&m, &n, bb, &m, ipiv, &info)
   22953             :  *     else:
   22954             :  *         b = cnp.PyArray_SimpleNew(2, dims, cnp.NPY_COMPLEX128)             # <<<<<<<<<<<<<<
   22955             :  *         bb = <cnp.complex128_t *>cnp.PyArray_DATA(b)
   22956             :  *         swap_c_and_f_layout(aa, bb, m, n)
   22957             :  */
   22958          34 :   __pyx_t_5 = PyArray_SimpleNew(2, __pyx_v_dims, NPY_COMPLEX128); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 78, __pyx_L1_error)
   22959          34 :   __Pyx_GOTREF(__pyx_t_5);
   22960          34 :   __pyx_v_b = __pyx_t_5;
   22961          34 :   __pyx_t_5 = 0;
   22962             : 
   22963             :   /* "scipy/linalg/_decomp_lu_cython.pyx":79
   22964             :  *     else:
   22965             :  *         b = cnp.PyArray_SimpleNew(2, dims, cnp.NPY_COMPLEX128)
   22966             :  *         bb = <cnp.complex128_t *>cnp.PyArray_DATA(b)             # <<<<<<<<<<<<<<
   22967             :  *         swap_c_and_f_layout(aa, bb, m, n)
   22968             :  *         zgetrf(&m, &n, bb, &m, ipiv, &info)
   22969             :  */
   22970          34 :   if (!(likely(((__pyx_v_b) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_b, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 79, __pyx_L1_error)
   22971          34 :   __pyx_v_bb = ((__pyx_t_double_complex *)PyArray_DATA(((PyArrayObject *)__pyx_v_b)));
   22972             : 
   22973             :   /* "scipy/linalg/_decomp_lu_cython.pyx":80
   22974             :  *         b = cnp.PyArray_SimpleNew(2, dims, cnp.NPY_COMPLEX128)
   22975             :  *         bb = <cnp.complex128_t *>cnp.PyArray_DATA(b)
   22976             :  *         swap_c_and_f_layout(aa, bb, m, n)             # <<<<<<<<<<<<<<
   22977             :  *         zgetrf(&m, &n, bb, &m, ipiv, &info)
   22978             :  * 
   22979             :  */
   22980          34 :   __pyx_fuse_3__pyx_f_5scipy_6linalg_23_cythonized_array_utils_swap_c_and_f_layout(__pyx_v_aa, __pyx_v_bb, __pyx_v_m, __pyx_v_n);
   22981             : 
   22982             :   /* "scipy/linalg/_decomp_lu_cython.pyx":81
   22983             :  *         bb = <cnp.complex128_t *>cnp.PyArray_DATA(b)
   22984             :  *         swap_c_and_f_layout(aa, bb, m, n)
   22985             :  *         zgetrf(&m, &n, bb, &m, ipiv, &info)             # <<<<<<<<<<<<<<
   22986             :  * 
   22987             :  *     if info < 0:
   22988             :  */
   22989          34 :   __pyx_f_5scipy_6linalg_13cython_lapack_zgetrf((&__pyx_v_m), (&__pyx_v_n), __pyx_v_bb, (&__pyx_v_m), __pyx_v_ipiv, (&__pyx_v_info));
   22990             : 
   22991             :   /* "scipy/linalg/_decomp_lu_cython.pyx":83
   22992             :  *         zgetrf(&m, &n, bb, &m, ipiv, &info)
   22993             :  * 
   22994             :  *     if info < 0:             # <<<<<<<<<<<<<<
   22995             :  *         raise ValueError('scipy.linalg.lu has encountered an internal'
   22996             :  *                          ' error in ?getrf routine with invalid value'
   22997             :  */
   22998          34 :   __pyx_t_4 = (__pyx_v_info < 0);
   22999          34 :   if (unlikely(__pyx_t_4)) {
   23000             : 
   23001             :     /* "scipy/linalg/_decomp_lu_cython.pyx":84
   23002             :  * 
   23003             :  *     if info < 0:
   23004             :  *         raise ValueError('scipy.linalg.lu has encountered an internal'             # <<<<<<<<<<<<<<
   23005             :  *                          ' error in ?getrf routine with invalid value'
   23006             :  *                          f' at {-info}-th parameter.')
   23007             :  */
   23008           0 :     __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 84, __pyx_L1_error)
   23009           0 :     __Pyx_GOTREF(__pyx_t_5);
   23010           0 :     __pyx_t_6 = 0;
   23011           0 :     __pyx_t_7 = 127;
   23012           0 :     __Pyx_INCREF(__pyx_kp_u_scipy_linalg_lu_has_encountered);
   23013           0 :     __pyx_t_6 += 90;
   23014           0 :     __Pyx_GIVEREF(__pyx_kp_u_scipy_linalg_lu_has_encountered);
   23015           0 :     PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_scipy_linalg_lu_has_encountered);
   23016             : 
   23017             :     /* "scipy/linalg/_decomp_lu_cython.pyx":86
   23018             :  *         raise ValueError('scipy.linalg.lu has encountered an internal'
   23019             :  *                          ' error in ?getrf routine with invalid value'
   23020             :  *                          f' at {-info}-th parameter.')             # <<<<<<<<<<<<<<
   23021             :  * 
   23022             :  *     # Get the result back to C-contiguous layout and clean-up
   23023             :  */
   23024           0 :     __pyx_t_8 = __Pyx_PyUnicode_From_int((-__pyx_v_info), 0, ' ', 'd'); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 86, __pyx_L1_error)
   23025           0 :     __Pyx_GOTREF(__pyx_t_8);
   23026           0 :     __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8);
   23027           0 :     __Pyx_GIVEREF(__pyx_t_8);
   23028           0 :     PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_8);
   23029           0 :     __pyx_t_8 = 0;
   23030           0 :     __Pyx_INCREF(__pyx_kp_u_th_parameter);
   23031           0 :     __pyx_t_6 += 14;
   23032           0 :     __Pyx_GIVEREF(__pyx_kp_u_th_parameter);
   23033           0 :     PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_th_parameter);
   23034             : 
   23035             :     /* "scipy/linalg/_decomp_lu_cython.pyx":84
   23036             :  * 
   23037             :  *     if info < 0:
   23038             :  *         raise ValueError('scipy.linalg.lu has encountered an internal'             # <<<<<<<<<<<<<<
   23039             :  *                          ' error in ?getrf routine with invalid value'
   23040             :  *                          f' at {-info}-th parameter.')
   23041             :  */
   23042           0 :     __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 84, __pyx_L1_error)
   23043           0 :     __Pyx_GOTREF(__pyx_t_8);
   23044           0 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   23045           0 :     __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 84, __pyx_L1_error)
   23046           0 :     __Pyx_GOTREF(__pyx_t_5);
   23047           0 :     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   23048           0 :     __Pyx_Raise(__pyx_t_5, 0, 0, 0);
   23049           0 :     __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   23050           0 :     __PYX_ERR(0, 84, __pyx_L1_error)
   23051             : 
   23052             :     /* "scipy/linalg/_decomp_lu_cython.pyx":83
   23053             :  *         zgetrf(&m, &n, bb, &m, ipiv, &info)
   23054             :  * 
   23055             :  *     if info < 0:             # <<<<<<<<<<<<<<
   23056             :  *         raise ValueError('scipy.linalg.lu has encountered an internal'
   23057             :  *                          ' error in ?getrf routine with invalid value'
   23058             :  */
   23059             :   }
   23060             : 
   23061             :   /* "scipy/linalg/_decomp_lu_cython.pyx":89
   23062             :  * 
   23063             :  *     # Get the result back to C-contiguous layout and clean-up
   23064             :  *     swap_c_and_f_layout(bb, aa, n, m)             # <<<<<<<<<<<<<<
   23065             :  * 
   23066             :  *     # Convert swaps on A to permutations on L since A = P @ L @ U
   23067             :  */
   23068          34 :   __pyx_fuse_3__pyx_f_5scipy_6linalg_23_cythonized_array_utils_swap_c_and_f_layout(__pyx_v_bb, __pyx_v_aa, __pyx_v_n, __pyx_v_m);
   23069             : 
   23070             :   /* "scipy/linalg/_decomp_lu_cython.pyx":92
   23071             :  * 
   23072             :  *     # Convert swaps on A to permutations on L since A = P @ L @ U
   23073             :  *     try:             # <<<<<<<<<<<<<<
   23074             :  *         # Basically we are following the cycles in ipiv
   23075             :  *         # and swapping an "np.arange" array for the inverse perm.
   23076             :  */
   23077             :   /*try:*/ {
   23078             : 
   23079             :     /* "scipy/linalg/_decomp_lu_cython.pyx":96
   23080             :  *         # and swapping an "np.arange" array for the inverse perm.
   23081             :  *         # Initialize perm
   23082             :  *         for ind1 in range(m): perm[ind1] = ind1             # <<<<<<<<<<<<<<
   23083             :  *         for ind1 in range(mn):
   23084             :  *             tmp_int = perm[ipiv[ind1]-1]
   23085             :  */
   23086          34 :     __pyx_t_3 = __pyx_v_m;
   23087          34 :     __pyx_t_1 = __pyx_t_3;
   23088         299 :     for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   23089         265 :       __pyx_v_ind1 = __pyx_t_2;
   23090         265 :       __pyx_t_9 = __pyx_v_ind1;
   23091         265 :       *((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) )) = __pyx_v_ind1;
   23092             :     }
   23093             : 
   23094             :     /* "scipy/linalg/_decomp_lu_cython.pyx":97
   23095             :  *         # Initialize perm
   23096             :  *         for ind1 in range(m): perm[ind1] = ind1
   23097             :  *         for ind1 in range(mn):             # <<<<<<<<<<<<<<
   23098             :  *             tmp_int = perm[ipiv[ind1]-1]
   23099             :  *             perm[ipiv[ind1]-1] = perm[ind1]
   23100             :  */
   23101         216 :     __pyx_t_3 = __pyx_v_mn;
   23102         216 :     __pyx_t_1 = __pyx_t_3;
   23103         216 :     for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   23104         182 :       __pyx_v_ind1 = __pyx_t_2;
   23105             : 
   23106             :       /* "scipy/linalg/_decomp_lu_cython.pyx":98
   23107             :  *         for ind1 in range(m): perm[ind1] = ind1
   23108             :  *         for ind1 in range(mn):
   23109             :  *             tmp_int = perm[ipiv[ind1]-1]             # <<<<<<<<<<<<<<
   23110             :  *             perm[ipiv[ind1]-1] = perm[ind1]
   23111             :  *             perm[ind1] = tmp_int
   23112             :  */
   23113         182 :       __pyx_t_9 = ((__pyx_v_ipiv[__pyx_v_ind1]) - 1);
   23114         182 :       __pyx_v_tmp_int = (*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) )));
   23115             : 
   23116             :       /* "scipy/linalg/_decomp_lu_cython.pyx":99
   23117             :  *         for ind1 in range(mn):
   23118             :  *             tmp_int = perm[ipiv[ind1]-1]
   23119             :  *             perm[ipiv[ind1]-1] = perm[ind1]             # <<<<<<<<<<<<<<
   23120             :  *             perm[ind1] = tmp_int
   23121             :  * 
   23122             :  */
   23123         182 :       __pyx_t_9 = __pyx_v_ind1;
   23124         182 :       __pyx_t_10 = ((__pyx_v_ipiv[__pyx_v_ind1]) - 1);
   23125         182 :       *((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_10)) )) = (*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) )));
   23126             : 
   23127             :       /* "scipy/linalg/_decomp_lu_cython.pyx":100
   23128             :  *             tmp_int = perm[ipiv[ind1]-1]
   23129             :  *             perm[ipiv[ind1]-1] = perm[ind1]
   23130             :  *             perm[ind1] = tmp_int             # <<<<<<<<<<<<<<
   23131             :  * 
   23132             :  *         # convert iperm to perm into ipiv and store back into perm
   23133             :  */
   23134         182 :       __pyx_t_9 = __pyx_v_ind1;
   23135         182 :       *((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) )) = __pyx_v_tmp_int;
   23136             :     }
   23137             : 
   23138             :     /* "scipy/linalg/_decomp_lu_cython.pyx":104
   23139             :  *         # convert iperm to perm into ipiv and store back into perm
   23140             :  *         # as final. Solution without argsort : ipiv[perm] = np.arange(m)
   23141             :  *         for ind1 in range(m):             # <<<<<<<<<<<<<<
   23142             :  *             ipiv[perm[ind1]] = ind1
   23143             :  *         for ind1 in range(m):
   23144             :  */
   23145         299 :     __pyx_t_3 = __pyx_v_m;
   23146         299 :     __pyx_t_1 = __pyx_t_3;
   23147         299 :     for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   23148         265 :       __pyx_v_ind1 = __pyx_t_2;
   23149             : 
   23150             :       /* "scipy/linalg/_decomp_lu_cython.pyx":105
   23151             :  *         # as final. Solution without argsort : ipiv[perm] = np.arange(m)
   23152             :  *         for ind1 in range(m):
   23153             :  *             ipiv[perm[ind1]] = ind1             # <<<<<<<<<<<<<<
   23154             :  *         for ind1 in range(m):
   23155             :  *             perm[ind1] = ipiv[ind1]
   23156             :  */
   23157         265 :       __pyx_t_9 = __pyx_v_ind1;
   23158         265 :       (__pyx_v_ipiv[(*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) )))]) = __pyx_v_ind1;
   23159             :     }
   23160             : 
   23161             :     /* "scipy/linalg/_decomp_lu_cython.pyx":106
   23162             :  *         for ind1 in range(m):
   23163             :  *             ipiv[perm[ind1]] = ind1
   23164             :  *         for ind1 in range(m):             # <<<<<<<<<<<<<<
   23165             :  *             perm[ind1] = ipiv[ind1]
   23166             :  * 
   23167             :  */
   23168          34 :     __pyx_t_3 = __pyx_v_m;
   23169          34 :     __pyx_t_1 = __pyx_t_3;
   23170         299 :     for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   23171         265 :       __pyx_v_ind1 = __pyx_t_2;
   23172             : 
   23173             :       /* "scipy/linalg/_decomp_lu_cython.pyx":107
   23174             :  *             ipiv[perm[ind1]] = ind1
   23175             :  *         for ind1 in range(m):
   23176             :  *             perm[ind1] = ipiv[ind1]             # <<<<<<<<<<<<<<
   23177             :  * 
   23178             :  *     finally:
   23179             :  */
   23180         265 :       __pyx_t_9 = __pyx_v_ind1;
   23181         265 :       *((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) )) = (__pyx_v_ipiv[__pyx_v_ind1]);
   23182             :     }
   23183             :   }
   23184             : 
   23185             :   /* "scipy/linalg/_decomp_lu_cython.pyx":110
   23186             :  * 
   23187             :  *     finally:
   23188             :  *         PyMem_Free(ipiv)             # <<<<<<<<<<<<<<
   23189             :  * 
   23190             :  *     # Separation of L and U parts
   23191             :  */
   23192             :   /*finally:*/ {
   23193             :     /*normal exit:*/{
   23194          34 :       PyMem_Free(__pyx_v_ipiv);
   23195          34 :       goto __pyx_L7;
   23196             :     }
   23197          34 :     __pyx_L7:;
   23198             :   }
   23199             : 
   23200             :   /* "scipy/linalg/_decomp_lu_cython.pyx":114
   23201             :  *     # Separation of L and U parts
   23202             :  * 
   23203             :  *     if m > n:  # tall, "a" holds bigger L             # <<<<<<<<<<<<<<
   23204             :  *         # Extract upper right rectangle to lu
   23205             :  *         for ind1 in range(mn):  # rows
   23206             :  */
   23207          34 :   __pyx_t_4 = (__pyx_v_m > __pyx_v_n);
   23208          34 :   if (__pyx_t_4) {
   23209             : 
   23210             :     /* "scipy/linalg/_decomp_lu_cython.pyx":116
   23211             :  *     if m > n:  # tall, "a" holds bigger L
   23212             :  *         # Extract upper right rectangle to lu
   23213             :  *         for ind1 in range(mn):  # rows             # <<<<<<<<<<<<<<
   23214             :  *             lu[ind1, ind1:mn] = a[ind1, ind1:mn]
   23215             :  * 
   23216             :  */
   23217          68 :     __pyx_t_3 = __pyx_v_mn;
   23218          68 :     __pyx_t_1 = __pyx_t_3;
   23219          68 :     for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   23220          57 :       __pyx_v_ind1 = __pyx_t_2;
   23221             : 
   23222             :       /* "scipy/linalg/_decomp_lu_cython.pyx":117
   23223             :  *         # Extract upper right rectangle to lu
   23224             :  *         for ind1 in range(mn):  # rows
   23225             :  *             lu[ind1, ind1:mn] = a[ind1, ind1:mn]             # <<<<<<<<<<<<<<
   23226             :  * 
   23227             :  *         for ind1 in range(mn):
   23228             :  */
   23229          57 :       __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 117, __pyx_L1_error)
   23230          57 :       __Pyx_GOTREF(__pyx_t_5);
   23231          57 :       __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 117, __pyx_L1_error)
   23232          57 :       __Pyx_GOTREF(__pyx_t_8);
   23233          57 :       __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_mn); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 117, __pyx_L1_error)
   23234          57 :       __Pyx_GOTREF(__pyx_t_11);
   23235          57 :       __pyx_t_12 = PySlice_New(__pyx_t_8, __pyx_t_11, Py_None); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 117, __pyx_L1_error)
   23236          57 :       __Pyx_GOTREF(__pyx_t_12);
   23237          57 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   23238          57 :       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   23239          57 :       __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 117, __pyx_L1_error)
   23240          57 :       __Pyx_GOTREF(__pyx_t_11);
   23241          57 :       __Pyx_GIVEREF(__pyx_t_5);
   23242          57 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_5)) __PYX_ERR(0, 117, __pyx_L1_error);
   23243          57 :       __Pyx_GIVEREF(__pyx_t_12);
   23244          57 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_12)) __PYX_ERR(0, 117, __pyx_L1_error);
   23245          57 :       __pyx_t_5 = 0;
   23246          57 :       __pyx_t_12 = 0;
   23247          57 :       __pyx_t_12 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_a), __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 117, __pyx_L1_error)
   23248          57 :       __Pyx_GOTREF(__pyx_t_12);
   23249          57 :       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   23250          57 :       __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 117, __pyx_L1_error)
   23251          57 :       __Pyx_GOTREF(__pyx_t_11);
   23252          57 :       __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 117, __pyx_L1_error)
   23253          57 :       __Pyx_GOTREF(__pyx_t_5);
   23254          57 :       __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_mn); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 117, __pyx_L1_error)
   23255          57 :       __Pyx_GOTREF(__pyx_t_8);
   23256          57 :       __pyx_t_13 = PySlice_New(__pyx_t_5, __pyx_t_8, Py_None); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 117, __pyx_L1_error)
   23257          57 :       __Pyx_GOTREF(__pyx_t_13);
   23258          57 :       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   23259          57 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   23260          57 :       __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 117, __pyx_L1_error)
   23261          57 :       __Pyx_GOTREF(__pyx_t_8);
   23262          57 :       __Pyx_GIVEREF(__pyx_t_11);
   23263          57 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_11)) __PYX_ERR(0, 117, __pyx_L1_error);
   23264          57 :       __Pyx_GIVEREF(__pyx_t_13);
   23265          57 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_13)) __PYX_ERR(0, 117, __pyx_L1_error);
   23266          57 :       __pyx_t_11 = 0;
   23267          57 :       __pyx_t_13 = 0;
   23268          57 :       if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_lu), __pyx_t_8, __pyx_t_12) < 0))) __PYX_ERR(0, 117, __pyx_L1_error)
   23269          57 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   23270         114 :       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
   23271             :     }
   23272             : 
   23273             :     /* "scipy/linalg/_decomp_lu_cython.pyx":119
   23274             :  *             lu[ind1, ind1:mn] = a[ind1, ind1:mn]
   23275             :  * 
   23276             :  *         for ind1 in range(mn):             # <<<<<<<<<<<<<<
   23277             :  *             a[ind1, ind1] = 1
   23278             :  *             a[ind1, ind1+1:mn] = 0
   23279             :  */
   23280          68 :     __pyx_t_3 = __pyx_v_mn;
   23281          68 :     __pyx_t_1 = __pyx_t_3;
   23282          68 :     for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   23283          57 :       __pyx_v_ind1 = __pyx_t_2;
   23284             : 
   23285             :       /* "scipy/linalg/_decomp_lu_cython.pyx":120
   23286             :  * 
   23287             :  *         for ind1 in range(mn):
   23288             :  *             a[ind1, ind1] = 1             # <<<<<<<<<<<<<<
   23289             :  *             a[ind1, ind1+1:mn] = 0
   23290             :  * 
   23291             :  */
   23292          57 :       __pyx_t_9 = __pyx_v_ind1;
   23293          57 :       __pyx_t_10 = __pyx_v_ind1;
   23294          57 :       *__Pyx_BufPtrStrided2d(__pyx_t_double_complex *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_a.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_a.diminfo[1].strides) = __pyx_t_double_complex_from_parts(1, 0);
   23295             : 
   23296             :       /* "scipy/linalg/_decomp_lu_cython.pyx":121
   23297             :  *         for ind1 in range(mn):
   23298             :  *             a[ind1, ind1] = 1
   23299             :  *             a[ind1, ind1+1:mn] = 0             # <<<<<<<<<<<<<<
   23300             :  * 
   23301             :  *     else:  # square or fat, "a" holds bigger U
   23302             :  */
   23303          57 :       __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 121, __pyx_L1_error)
   23304          57 :       __Pyx_GOTREF(__pyx_t_12);
   23305          57 :       __pyx_t_8 = __Pyx_PyInt_From_long((__pyx_v_ind1 + 1)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 121, __pyx_L1_error)
   23306          57 :       __Pyx_GOTREF(__pyx_t_8);
   23307          57 :       __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_mn); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 121, __pyx_L1_error)
   23308          57 :       __Pyx_GOTREF(__pyx_t_13);
   23309          57 :       __pyx_t_11 = PySlice_New(__pyx_t_8, __pyx_t_13, Py_None); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 121, __pyx_L1_error)
   23310          57 :       __Pyx_GOTREF(__pyx_t_11);
   23311          57 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   23312          57 :       __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   23313          57 :       __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 121, __pyx_L1_error)
   23314          57 :       __Pyx_GOTREF(__pyx_t_13);
   23315          57 :       __Pyx_GIVEREF(__pyx_t_12);
   23316          57 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12)) __PYX_ERR(0, 121, __pyx_L1_error);
   23317          57 :       __Pyx_GIVEREF(__pyx_t_11);
   23318          57 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_11)) __PYX_ERR(0, 121, __pyx_L1_error);
   23319          57 :       __pyx_t_12 = 0;
   23320          57 :       __pyx_t_11 = 0;
   23321          57 :       if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_a), __pyx_t_13, __pyx_int_0) < 0))) __PYX_ERR(0, 121, __pyx_L1_error)
   23322         125 :       __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   23323             :     }
   23324             : 
   23325             :     /* "scipy/linalg/_decomp_lu_cython.pyx":114
   23326             :  *     # Separation of L and U parts
   23327             :  * 
   23328             :  *     if m > n:  # tall, "a" holds bigger L             # <<<<<<<<<<<<<<
   23329             :  *         # Extract upper right rectangle to lu
   23330             :  *         for ind1 in range(mn):  # rows
   23331             :  */
   23332          11 :     goto __pyx_L16;
   23333             :   }
   23334             : 
   23335             :   /* "scipy/linalg/_decomp_lu_cython.pyx":125
   23336             :  *     else:  # square or fat, "a" holds bigger U
   23337             :  * 
   23338             :  *         lu[0, 0] = 1             # <<<<<<<<<<<<<<
   23339             :  *         for ind1 in range(1, mn):  # rows
   23340             :  *             lu[ind1, :ind1] = a[ind1, :ind1]
   23341             :  */
   23342             :   /*else*/ {
   23343          23 :     __pyx_t_10 = 0;
   23344          23 :     __pyx_t_9 = 0;
   23345          23 :     *__Pyx_BufPtrStrided2d(__pyx_t_double_complex *, __pyx_pybuffernd_lu.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_lu.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_lu.diminfo[1].strides) = __pyx_t_double_complex_from_parts(1, 0);
   23346             : 
   23347             :     /* "scipy/linalg/_decomp_lu_cython.pyx":126
   23348             :  * 
   23349             :  *         lu[0, 0] = 1
   23350             :  *         for ind1 in range(1, mn):  # rows             # <<<<<<<<<<<<<<
   23351             :  *             lu[ind1, :ind1] = a[ind1, :ind1]
   23352             :  *             lu[ind1, ind1] = 1
   23353             :  */
   23354          23 :     __pyx_t_3 = __pyx_v_mn;
   23355          23 :     __pyx_t_1 = __pyx_t_3;
   23356         125 :     for (__pyx_t_2 = 1; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   23357         102 :       __pyx_v_ind1 = __pyx_t_2;
   23358             : 
   23359             :       /* "scipy/linalg/_decomp_lu_cython.pyx":127
   23360             :  *         lu[0, 0] = 1
   23361             :  *         for ind1 in range(1, mn):  # rows
   23362             :  *             lu[ind1, :ind1] = a[ind1, :ind1]             # <<<<<<<<<<<<<<
   23363             :  *             lu[ind1, ind1] = 1
   23364             :  * 
   23365             :  */
   23366         102 :       __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 127, __pyx_L1_error)
   23367         102 :       __Pyx_GOTREF(__pyx_t_13);
   23368         102 :       __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 127, __pyx_L1_error)
   23369         102 :       __Pyx_GOTREF(__pyx_t_11);
   23370         102 :       __pyx_t_12 = PySlice_New(Py_None, __pyx_t_11, Py_None); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 127, __pyx_L1_error)
   23371         102 :       __Pyx_GOTREF(__pyx_t_12);
   23372         102 :       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   23373         102 :       __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 127, __pyx_L1_error)
   23374         102 :       __Pyx_GOTREF(__pyx_t_11);
   23375         102 :       __Pyx_GIVEREF(__pyx_t_13);
   23376         102 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_13)) __PYX_ERR(0, 127, __pyx_L1_error);
   23377         102 :       __Pyx_GIVEREF(__pyx_t_12);
   23378         102 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_12)) __PYX_ERR(0, 127, __pyx_L1_error);
   23379         102 :       __pyx_t_13 = 0;
   23380         102 :       __pyx_t_12 = 0;
   23381         102 :       __pyx_t_12 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_a), __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 127, __pyx_L1_error)
   23382         102 :       __Pyx_GOTREF(__pyx_t_12);
   23383         102 :       __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   23384         102 :       __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 127, __pyx_L1_error)
   23385         102 :       __Pyx_GOTREF(__pyx_t_11);
   23386         102 :       __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 127, __pyx_L1_error)
   23387         102 :       __Pyx_GOTREF(__pyx_t_13);
   23388         102 :       __pyx_t_8 = PySlice_New(Py_None, __pyx_t_13, Py_None); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 127, __pyx_L1_error)
   23389         102 :       __Pyx_GOTREF(__pyx_t_8);
   23390         102 :       __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   23391         102 :       __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 127, __pyx_L1_error)
   23392         102 :       __Pyx_GOTREF(__pyx_t_13);
   23393         102 :       __Pyx_GIVEREF(__pyx_t_11);
   23394         102 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_11)) __PYX_ERR(0, 127, __pyx_L1_error);
   23395         102 :       __Pyx_GIVEREF(__pyx_t_8);
   23396         102 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_8)) __PYX_ERR(0, 127, __pyx_L1_error);
   23397         102 :       __pyx_t_11 = 0;
   23398         102 :       __pyx_t_8 = 0;
   23399         102 :       if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_lu), __pyx_t_13, __pyx_t_12) < 0))) __PYX_ERR(0, 127, __pyx_L1_error)
   23400         102 :       __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   23401         102 :       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
   23402             : 
   23403             :       /* "scipy/linalg/_decomp_lu_cython.pyx":128
   23404             :  *         for ind1 in range(1, mn):  # rows
   23405             :  *             lu[ind1, :ind1] = a[ind1, :ind1]
   23406             :  *             lu[ind1, ind1] = 1             # <<<<<<<<<<<<<<
   23407             :  * 
   23408             :  *         for ind2 in range(mn - 1):  # cols
   23409             :  */
   23410         102 :       __pyx_t_9 = __pyx_v_ind1;
   23411         102 :       __pyx_t_10 = __pyx_v_ind1;
   23412         102 :       *__Pyx_BufPtrStrided2d(__pyx_t_double_complex *, __pyx_pybuffernd_lu.rcbuffer->pybuffer.buf, __pyx_t_9, __pyx_pybuffernd_lu.diminfo[0].strides, __pyx_t_10, __pyx_pybuffernd_lu.diminfo[1].strides) = __pyx_t_double_complex_from_parts(1, 0);
   23413             :     }
   23414             : 
   23415             :     /* "scipy/linalg/_decomp_lu_cython.pyx":130
   23416             :  *             lu[ind1, ind1] = 1
   23417             :  * 
   23418             :  *         for ind2 in range(mn - 1):  # cols             # <<<<<<<<<<<<<<
   23419             :  *             for ind1 in range(ind2+1, m):  # rows
   23420             :  *                 a[ind1, ind2] = 0
   23421             :  */
   23422          23 :     __pyx_t_14 = (__pyx_v_mn - 1);
   23423          23 :     __pyx_t_15 = __pyx_t_14;
   23424         125 :     for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_15; __pyx_t_3+=1) {
   23425         102 :       __pyx_v_ind2 = __pyx_t_3;
   23426             : 
   23427             :       /* "scipy/linalg/_decomp_lu_cython.pyx":131
   23428             :  * 
   23429             :  *         for ind2 in range(mn - 1):  # cols
   23430             :  *             for ind1 in range(ind2+1, m):  # rows             # <<<<<<<<<<<<<<
   23431             :  *                 a[ind1, ind2] = 0
   23432             :  * 
   23433             :  */
   23434         102 :       __pyx_t_1 = __pyx_v_m;
   23435         102 :       __pyx_t_2 = __pyx_t_1;
   23436         591 :       for (__pyx_t_16 = (__pyx_v_ind2 + 1); __pyx_t_16 < __pyx_t_2; __pyx_t_16+=1) {
   23437         489 :         __pyx_v_ind1 = __pyx_t_16;
   23438             : 
   23439             :         /* "scipy/linalg/_decomp_lu_cython.pyx":132
   23440             :  *         for ind2 in range(mn - 1):  # cols
   23441             :  *             for ind1 in range(ind2+1, m):  # rows
   23442             :  *                 a[ind1, ind2] = 0             # <<<<<<<<<<<<<<
   23443             :  * 
   23444             :  *     if permute_l:
   23445             :  */
   23446         489 :         __pyx_t_10 = __pyx_v_ind1;
   23447         489 :         __pyx_t_9 = __pyx_v_ind2;
   23448         489 :         *__Pyx_BufPtrStrided2d(__pyx_t_double_complex *, __pyx_pybuffernd_a.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_a.diminfo[0].strides, __pyx_t_9, __pyx_pybuffernd_a.diminfo[1].strides) = __pyx_t_double_complex_from_parts(0, 0);
   23449             :       }
   23450             :     }
   23451             :   }
   23452          23 :   __pyx_L16:;
   23453             : 
   23454             :   /* "scipy/linalg/_decomp_lu_cython.pyx":134
   23455             :  *                 a[ind1, ind2] = 0
   23456             :  * 
   23457             :  *     if permute_l:             # <<<<<<<<<<<<<<
   23458             :  *         # b still exists -> use it as temp array
   23459             :  *         # we copy everything to b and pick back
   23460             :  */
   23461          34 :   if (__pyx_v_permute_l) {
   23462             : 
   23463             :     /* "scipy/linalg/_decomp_lu_cython.pyx":139
   23464             :  *         # rows from b as dictated by perm
   23465             :  * 
   23466             :  *         if m > n:             # <<<<<<<<<<<<<<
   23467             :  *             b[:, :] = a[:, :]
   23468             :  *             # memcpy(bb, &a[0, 0], m*mn*sizeof(lapack_t))
   23469             :  */
   23470          20 :     __pyx_t_4 = (__pyx_v_m > __pyx_v_n);
   23471          20 :     if (__pyx_t_4) {
   23472             : 
   23473             :       /* "scipy/linalg/_decomp_lu_cython.pyx":140
   23474             :  * 
   23475             :  *         if m > n:
   23476             :  *             b[:, :] = a[:, :]             # <<<<<<<<<<<<<<
   23477             :  *             # memcpy(bb, &a[0, 0], m*mn*sizeof(lapack_t))
   23478             :  *             for ind1 in range(m):
   23479             :  */
   23480          10 :       __pyx_t_12 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_a), __pyx_tuple__50); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 140, __pyx_L1_error)
   23481          10 :       __Pyx_GOTREF(__pyx_t_12);
   23482          10 :       if (unlikely((PyObject_SetItem(__pyx_v_b, __pyx_tuple__53, __pyx_t_12) < 0))) __PYX_ERR(0, 140, __pyx_L1_error)
   23483          10 :       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
   23484             : 
   23485             :       /* "scipy/linalg/_decomp_lu_cython.pyx":142
   23486             :  *             b[:, :] = a[:, :]
   23487             :  *             # memcpy(bb, &a[0, 0], m*mn*sizeof(lapack_t))
   23488             :  *             for ind1 in range(m):             # <<<<<<<<<<<<<<
   23489             :  *                 if perm[ind1] == ind1:
   23490             :  *                     continue
   23491             :  */
   23492          10 :       __pyx_t_3 = __pyx_v_m;
   23493          10 :       __pyx_t_1 = __pyx_t_3;
   23494         146 :       for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   23495         136 :         __pyx_v_ind1 = __pyx_t_2;
   23496             : 
   23497             :         /* "scipy/linalg/_decomp_lu_cython.pyx":143
   23498             :  *             # memcpy(bb, &a[0, 0], m*mn*sizeof(lapack_t))
   23499             :  *             for ind1 in range(m):
   23500             :  *                 if perm[ind1] == ind1:             # <<<<<<<<<<<<<<
   23501             :  *                     continue
   23502             :  *                 else:
   23503             :  */
   23504         136 :         __pyx_t_9 = __pyx_v_ind1;
   23505         136 :         __pyx_t_4 = ((*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) ))) == __pyx_v_ind1);
   23506         136 :         if (__pyx_t_4) {
   23507             : 
   23508             :           /* "scipy/linalg/_decomp_lu_cython.pyx":144
   23509             :  *             for ind1 in range(m):
   23510             :  *                 if perm[ind1] == ind1:
   23511             :  *                     continue             # <<<<<<<<<<<<<<
   23512             :  *                 else:
   23513             :  *                     a[ind1, :] = b[perm[ind1], :]
   23514             :  */
   23515          60 :           goto __pyx_L29_continue;
   23516             : 
   23517             :           /* "scipy/linalg/_decomp_lu_cython.pyx":143
   23518             :  *             # memcpy(bb, &a[0, 0], m*mn*sizeof(lapack_t))
   23519             :  *             for ind1 in range(m):
   23520             :  *                 if perm[ind1] == ind1:             # <<<<<<<<<<<<<<
   23521             :  *                     continue
   23522             :  *                 else:
   23523             :  */
   23524             :         }
   23525             : 
   23526             :         /* "scipy/linalg/_decomp_lu_cython.pyx":146
   23527             :  *                     continue
   23528             :  *                 else:
   23529             :  *                     a[ind1, :] = b[perm[ind1], :]             # <<<<<<<<<<<<<<
   23530             :  * 
   23531             :  *         else:  # same but for lu array
   23532             :  */
   23533             :         /*else*/ {
   23534          76 :           __pyx_t_9 = __pyx_v_ind1;
   23535          76 :           __pyx_t_12 = __Pyx_PyInt_From_int((*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) )))); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 146, __pyx_L1_error)
   23536          76 :           __Pyx_GOTREF(__pyx_t_12);
   23537          76 :           __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 146, __pyx_L1_error)
   23538          76 :           __Pyx_GOTREF(__pyx_t_13);
   23539          76 :           __Pyx_GIVEREF(__pyx_t_12);
   23540          76 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12)) __PYX_ERR(0, 146, __pyx_L1_error);
   23541          76 :           __Pyx_INCREF(__pyx_slice__54);
   23542          76 :           __Pyx_GIVEREF(__pyx_slice__54);
   23543          76 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_slice__54)) __PYX_ERR(0, 146, __pyx_L1_error);
   23544          76 :           __pyx_t_12 = 0;
   23545          76 :           __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_v_b, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 146, __pyx_L1_error)
   23546          76 :           __Pyx_GOTREF(__pyx_t_12);
   23547          76 :           __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
   23548          76 :           __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 146, __pyx_L1_error)
   23549          76 :           __Pyx_GOTREF(__pyx_t_13);
   23550          76 :           __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 146, __pyx_L1_error)
   23551          76 :           __Pyx_GOTREF(__pyx_t_8);
   23552          76 :           __Pyx_GIVEREF(__pyx_t_13);
   23553          76 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_13)) __PYX_ERR(0, 146, __pyx_L1_error);
   23554          76 :           __Pyx_INCREF(__pyx_slice__55);
   23555          76 :           __Pyx_GIVEREF(__pyx_slice__55);
   23556          76 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_slice__55)) __PYX_ERR(0, 146, __pyx_L1_error);
   23557          76 :           __pyx_t_13 = 0;
   23558          76 :           if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_a), __pyx_t_8, __pyx_t_12) < 0))) __PYX_ERR(0, 146, __pyx_L1_error)
   23559          76 :           __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   23560          76 :           __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
   23561             :         }
   23562         136 :         __pyx_L29_continue:;
   23563             :       }
   23564             : 
   23565             :       /* "scipy/linalg/_decomp_lu_cython.pyx":139
   23566             :  *         # rows from b as dictated by perm
   23567             :  * 
   23568             :  *         if m > n:             # <<<<<<<<<<<<<<
   23569             :  *             b[:, :] = a[:, :]
   23570             :  *             # memcpy(bb, &a[0, 0], m*mn*sizeof(lapack_t))
   23571             :  */
   23572          10 :       goto __pyx_L28;
   23573             :     }
   23574             : 
   23575             :     /* "scipy/linalg/_decomp_lu_cython.pyx":149
   23576             :  * 
   23577             :  *         else:  # same but for lu array
   23578             :  *             b[:mn, :mn] = lu[:, :]             # <<<<<<<<<<<<<<
   23579             :  *             # memcpy(bb, &lu[0, 0], mn*n*sizeof(lapack_t))
   23580             :  *             for ind1 in range(mn):
   23581             :  */
   23582             :     /*else*/ {
   23583          10 :       __pyx_t_12 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_lu), __pyx_tuple__58); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 149, __pyx_L1_error)
   23584          10 :       __Pyx_GOTREF(__pyx_t_12);
   23585          10 :       __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_mn); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 149, __pyx_L1_error)
   23586          10 :       __Pyx_GOTREF(__pyx_t_8);
   23587          10 :       __pyx_t_13 = PySlice_New(Py_None, __pyx_t_8, Py_None); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 149, __pyx_L1_error)
   23588          10 :       __Pyx_GOTREF(__pyx_t_13);
   23589          10 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   23590          10 :       __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_mn); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 149, __pyx_L1_error)
   23591          10 :       __Pyx_GOTREF(__pyx_t_8);
   23592          10 :       __pyx_t_11 = PySlice_New(Py_None, __pyx_t_8, Py_None); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 149, __pyx_L1_error)
   23593          10 :       __Pyx_GOTREF(__pyx_t_11);
   23594          10 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   23595          10 :       __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 149, __pyx_L1_error)
   23596          10 :       __Pyx_GOTREF(__pyx_t_8);
   23597          10 :       __Pyx_GIVEREF(__pyx_t_13);
   23598          10 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_13)) __PYX_ERR(0, 149, __pyx_L1_error);
   23599          10 :       __Pyx_GIVEREF(__pyx_t_11);
   23600          10 :       if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_11)) __PYX_ERR(0, 149, __pyx_L1_error);
   23601          10 :       __pyx_t_13 = 0;
   23602          10 :       __pyx_t_11 = 0;
   23603          10 :       if (unlikely((PyObject_SetItem(__pyx_v_b, __pyx_t_8, __pyx_t_12) < 0))) __PYX_ERR(0, 149, __pyx_L1_error)
   23604          10 :       __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   23605          10 :       __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
   23606             : 
   23607             :       /* "scipy/linalg/_decomp_lu_cython.pyx":151
   23608             :  *             b[:mn, :mn] = lu[:, :]
   23609             :  *             # memcpy(bb, &lu[0, 0], mn*n*sizeof(lapack_t))
   23610             :  *             for ind1 in range(mn):             # <<<<<<<<<<<<<<
   23611             :  *                 if perm[ind1] == ind1:
   23612             :  *                     continue
   23613             :  */
   23614          92 :       __pyx_t_3 = __pyx_v_mn;
   23615          92 :       __pyx_t_1 = __pyx_t_3;
   23616          92 :       for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
   23617          82 :         __pyx_v_ind1 = __pyx_t_2;
   23618             : 
   23619             :         /* "scipy/linalg/_decomp_lu_cython.pyx":152
   23620             :  *             # memcpy(bb, &lu[0, 0], mn*n*sizeof(lapack_t))
   23621             :  *             for ind1 in range(mn):
   23622             :  *                 if perm[ind1] == ind1:             # <<<<<<<<<<<<<<
   23623             :  *                     continue
   23624             :  *                 else:
   23625             :  */
   23626          82 :         __pyx_t_9 = __pyx_v_ind1;
   23627          82 :         __pyx_t_4 = ((*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) ))) == __pyx_v_ind1);
   23628          82 :         if (__pyx_t_4) {
   23629             : 
   23630             :           /* "scipy/linalg/_decomp_lu_cython.pyx":153
   23631             :  *             for ind1 in range(mn):
   23632             :  *                 if perm[ind1] == ind1:
   23633             :  *                     continue             # <<<<<<<<<<<<<<
   23634             :  *                 else:
   23635             :  *                     lu[ind1, :] = b[perm[ind1], :mn]
   23636             :  */
   23637           7 :           goto __pyx_L32_continue;
   23638             : 
   23639             :           /* "scipy/linalg/_decomp_lu_cython.pyx":152
   23640             :  *             # memcpy(bb, &lu[0, 0], mn*n*sizeof(lapack_t))
   23641             :  *             for ind1 in range(mn):
   23642             :  *                 if perm[ind1] == ind1:             # <<<<<<<<<<<<<<
   23643             :  *                     continue
   23644             :  *                 else:
   23645             :  */
   23646             :         }
   23647             : 
   23648             :         /* "scipy/linalg/_decomp_lu_cython.pyx":155
   23649             :  *                     continue
   23650             :  *                 else:
   23651             :  *                     lu[ind1, :] = b[perm[ind1], :mn]             # <<<<<<<<<<<<<<
   23652             :  * 
   23653             :  * 
   23654             :  */
   23655             :         /*else*/ {
   23656          75 :           __pyx_t_9 = __pyx_v_ind1;
   23657          75 :           __pyx_t_12 = __Pyx_PyInt_From_int((*((int *) ( /* dim=0 */ ((char *) (((int *) __pyx_v_perm.data) + __pyx_t_9)) )))); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 155, __pyx_L1_error)
   23658          75 :           __Pyx_GOTREF(__pyx_t_12);
   23659          75 :           __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_mn); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 155, __pyx_L1_error)
   23660          75 :           __Pyx_GOTREF(__pyx_t_8);
   23661          75 :           __pyx_t_11 = PySlice_New(Py_None, __pyx_t_8, Py_None); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 155, __pyx_L1_error)
   23662          75 :           __Pyx_GOTREF(__pyx_t_11);
   23663          75 :           __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   23664          75 :           __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 155, __pyx_L1_error)
   23665          75 :           __Pyx_GOTREF(__pyx_t_8);
   23666          75 :           __Pyx_GIVEREF(__pyx_t_12);
   23667          75 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_12)) __PYX_ERR(0, 155, __pyx_L1_error);
   23668          75 :           __Pyx_GIVEREF(__pyx_t_11);
   23669          75 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_11)) __PYX_ERR(0, 155, __pyx_L1_error);
   23670          75 :           __pyx_t_12 = 0;
   23671          75 :           __pyx_t_11 = 0;
   23672          75 :           __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_v_b, __pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 155, __pyx_L1_error)
   23673          75 :           __Pyx_GOTREF(__pyx_t_11);
   23674          75 :           __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   23675          75 :           __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_ind1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 155, __pyx_L1_error)
   23676          75 :           __Pyx_GOTREF(__pyx_t_8);
   23677          75 :           __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 155, __pyx_L1_error)
   23678          75 :           __Pyx_GOTREF(__pyx_t_12);
   23679          75 :           __Pyx_GIVEREF(__pyx_t_8);
   23680          75 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_8)) __PYX_ERR(0, 155, __pyx_L1_error);
   23681          75 :           __Pyx_INCREF(__pyx_slice__59);
   23682          75 :           __Pyx_GIVEREF(__pyx_slice__59);
   23683          75 :           if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_slice__59)) __PYX_ERR(0, 155, __pyx_L1_error);
   23684          75 :           __pyx_t_8 = 0;
   23685          75 :           if (unlikely((PyObject_SetItem(((PyObject *)__pyx_v_lu), __pyx_t_12, __pyx_t_11) < 0))) __PYX_ERR(0, 155, __pyx_L1_error)
   23686          75 :           __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
   23687          75 :           __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
   23688             :         }
   23689          82 :         __pyx_L32_continue:;
   23690             :       }
   23691             :     }
   23692          10 :     __pyx_L28:;
   23693             : 
   23694             :     /* "scipy/linalg/_decomp_lu_cython.pyx":134
   23695             :  *                 a[ind1, ind2] = 0
   23696             :  * 
   23697             :  *     if permute_l:             # <<<<<<<<<<<<<<
   23698             :  *         # b still exists -> use it as temp array
   23699             :  *         # we copy everything to b and pick back
   23700             :  */
   23701             :   }
   23702             : 
   23703             :   /* "scipy/linalg/_decomp_lu_cython.pyx":22
   23704             :  * @cython.boundscheck(False)
   23705             :  * @cython.initializedcheck(False)
   23706             :  * cdef void lu_decompose(cnp.ndarray[lapack_t, ndim=2] a,             # <<<<<<<<<<<<<<
   23707             :  *                        cnp.ndarray[lapack_t, ndim=2] lu,
   23708             :  *                        int[::1] perm,
   23709             :  */
   23710             : 
   23711             :   /* function exit code */
   23712          34 :   goto __pyx_L0;
   23713           0 :   __pyx_L1_error:;
   23714           0 :   __Pyx_XDECREF(__pyx_t_5);
   23715           0 :   __Pyx_XDECREF(__pyx_t_8);
   23716           0 :   __Pyx_XDECREF(__pyx_t_11);
   23717           0 :   __Pyx_XDECREF(__pyx_t_12);
   23718           0 :   __Pyx_XDECREF(__pyx_t_13);
   23719           0 :   { PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
   23720           0 :     __Pyx_PyThreadState_declare
   23721           0 :     __Pyx_PyThreadState_assign
   23722           0 :     __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
   23723           0 :     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a.rcbuffer->pybuffer);
   23724           0 :     __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lu.rcbuffer->pybuffer);
   23725           0 :   __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
   23726           0 :   __Pyx_WriteUnraisable("scipy.linalg._decomp_lu_cython.lu_decompose", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
   23727           0 :   goto __pyx_L2;
   23728          34 :   __pyx_L0:;
   23729          34 :   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_a.rcbuffer->pybuffer);
   23730          34 :   __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_lu.rcbuffer->pybuffer);
   23731          34 :   __pyx_L2:;
   23732          34 :   __Pyx_XDECREF(__pyx_v_b);
   23733          34 :   __Pyx_RefNannyFinishContext();
   23734          34 : }
   23735             : 
   23736             : /* "scipy/linalg/_decomp_lu_cython.pyx":158
   23737             :  * 
   23738             :  * 
   23739             :  * @cython.nonecheck(False)             # <<<<<<<<<<<<<<
   23740             :  * @cython.initializedcheck(False)
   23741             :  * def lu_dispatcher(a, u, piv, permute_l):
   23742             :  */
   23743             : 
   23744             : /* Python wrapper */
   23745             : static PyObject *__pyx_pw_5scipy_6linalg_17_decomp_lu_cython_1lu_dispatcher(PyObject *__pyx_self, 
   23746             : #if CYTHON_METH_FASTCALL
   23747             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   23748             : #else
   23749             : PyObject *__pyx_args, PyObject *__pyx_kwds
   23750             : #endif
   23751             : ); /*proto*/
   23752             : static PyMethodDef __pyx_mdef_5scipy_6linalg_17_decomp_lu_cython_1lu_dispatcher = {"lu_dispatcher", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5scipy_6linalg_17_decomp_lu_cython_1lu_dispatcher, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
   23753         141 : static PyObject *__pyx_pw_5scipy_6linalg_17_decomp_lu_cython_1lu_dispatcher(PyObject *__pyx_self, 
   23754             : #if CYTHON_METH_FASTCALL
   23755             : PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
   23756             : #else
   23757             : PyObject *__pyx_args, PyObject *__pyx_kwds
   23758             : #endif
   23759             : ) {
   23760         141 :   PyObject *__pyx_v_a = 0;
   23761         141 :   PyObject *__pyx_v_u = 0;
   23762         141 :   PyObject *__pyx_v_piv = 0;
   23763         141 :   PyObject *__pyx_v_permute_l = 0;
   23764             :   #if !CYTHON_METH_FASTCALL
   23765             :   CYTHON_UNUSED Py_ssize_t __pyx_nargs;
   23766             :   #endif
   23767         141 :   CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
   23768         141 :   PyObject* values[4] = {0,0,0,0};
   23769         141 :   int __pyx_lineno = 0;
   23770         141 :   const char *__pyx_filename = NULL;
   23771         141 :   int __pyx_clineno = 0;
   23772         141 :   PyObject *__pyx_r = 0;
   23773             :   __Pyx_RefNannyDeclarations
   23774         141 :   __Pyx_RefNannySetupContext("lu_dispatcher (wrapper)", 0);
   23775             :   #if !CYTHON_METH_FASTCALL
   23776             :   #if CYTHON_ASSUME_SAFE_MACROS
   23777             :   __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
   23778             :   #else
   23779             :   __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
   23780             :   #endif
   23781             :   #endif
   23782         141 :   __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
   23783             :   {
   23784         141 :     PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_u,&__pyx_n_s_piv,&__pyx_n_s_permute_l,0};
   23785         141 :     if (__pyx_kwds) {
   23786           0 :       Py_ssize_t kw_args;
   23787           0 :       switch (__pyx_nargs) {
   23788           0 :         case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
   23789           0 :         CYTHON_FALLTHROUGH;
   23790           0 :         case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
   23791           0 :         CYTHON_FALLTHROUGH;
   23792           0 :         case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   23793           0 :         CYTHON_FALLTHROUGH;
   23794           0 :         case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   23795           0 :         CYTHON_FALLTHROUGH;
   23796           0 :         case  0: break;
   23797           0 :         default: goto __pyx_L5_argtuple_error;
   23798             :       }
   23799           0 :       kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
   23800           0 :       switch (__pyx_nargs) {
   23801           0 :         case  0:
   23802           0 :         if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_a)) != 0)) {
   23803           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
   23804           0 :           kw_args--;
   23805             :         }
   23806           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 158, __pyx_L3_error)
   23807           0 :         else goto __pyx_L5_argtuple_error;
   23808           0 :         CYTHON_FALLTHROUGH;
   23809             :         case  1:
   23810           0 :         if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_u)) != 0)) {
   23811           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
   23812           0 :           kw_args--;
   23813             :         }
   23814           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 158, __pyx_L3_error)
   23815             :         else {
   23816           0 :           __Pyx_RaiseArgtupleInvalid("lu_dispatcher", 1, 4, 4, 1); __PYX_ERR(0, 158, __pyx_L3_error)
   23817             :         }
   23818           0 :         CYTHON_FALLTHROUGH;
   23819             :         case  2:
   23820           0 :         if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_piv)) != 0)) {
   23821           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
   23822           0 :           kw_args--;
   23823             :         }
   23824           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 158, __pyx_L3_error)
   23825             :         else {
   23826           0 :           __Pyx_RaiseArgtupleInvalid("lu_dispatcher", 1, 4, 4, 2); __PYX_ERR(0, 158, __pyx_L3_error)
   23827             :         }
   23828           0 :         CYTHON_FALLTHROUGH;
   23829             :         case  3:
   23830           0 :         if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_permute_l)) != 0)) {
   23831           0 :           (void)__Pyx_Arg_NewRef_FASTCALL(values[3]);
   23832           0 :           kw_args--;
   23833             :         }
   23834           0 :         else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 158, __pyx_L3_error)
   23835             :         else {
   23836           0 :           __Pyx_RaiseArgtupleInvalid("lu_dispatcher", 1, 4, 4, 3); __PYX_ERR(0, 158, __pyx_L3_error)
   23837             :         }
   23838             :       }
   23839           0 :       if (unlikely(kw_args > 0)) {
   23840           0 :         const Py_ssize_t kwd_pos_args = __pyx_nargs;
   23841           0 :         if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "lu_dispatcher") < 0)) __PYX_ERR(0, 158, __pyx_L3_error)
   23842             :       }
   23843         141 :     } else if (unlikely(__pyx_nargs != 4)) {
   23844           0 :       goto __pyx_L5_argtuple_error;
   23845             :     } else {
   23846         141 :       values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
   23847         141 :       values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
   23848         141 :       values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
   23849         141 :       values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
   23850             :     }
   23851         141 :     __pyx_v_a = values[0];
   23852         141 :     __pyx_v_u = values[1];
   23853         141 :     __pyx_v_piv = values[2];
   23854         141 :     __pyx_v_permute_l = values[3];
   23855             :   }
   23856         141 :   goto __pyx_L6_skip;
   23857           0 :   __pyx_L5_argtuple_error:;
   23858           0 :   __Pyx_RaiseArgtupleInvalid("lu_dispatcher", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 158, __pyx_L3_error)
   23859         141 :   __pyx_L6_skip:;
   23860         141 :   goto __pyx_L4_argument_unpacking_done;
   23861           0 :   __pyx_L3_error:;
   23862             :   {
   23863           0 :     Py_ssize_t __pyx_temp;
   23864           0 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   23865             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   23866             :     }
   23867             :   }
   23868           0 :   __Pyx_AddTraceback("scipy.linalg._decomp_lu_cython.lu_dispatcher", __pyx_clineno, __pyx_lineno, __pyx_filename);
   23869           0 :   __Pyx_RefNannyFinishContext();
   23870           0 :   return NULL;
   23871         141 :   __pyx_L4_argument_unpacking_done:;
   23872         141 :   __pyx_r = __pyx_pf_5scipy_6linalg_17_decomp_lu_cython_lu_dispatcher(__pyx_self, __pyx_v_a, __pyx_v_u, __pyx_v_piv, __pyx_v_permute_l);
   23873             : 
   23874             :   /* function exit code */
   23875             :   {
   23876         141 :     Py_ssize_t __pyx_temp;
   23877         141 :     for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
   23878             :       __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
   23879             :     }
   23880             :   }
   23881             :   __Pyx_RefNannyFinishContext();
   23882             :   return __pyx_r;
   23883             : }
   23884             : 
   23885         141 : static PyObject *__pyx_pf_5scipy_6linalg_17_decomp_lu_cython_lu_dispatcher(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_u, PyObject *__pyx_v_piv, PyObject *__pyx_v_permute_l) {
   23886         141 :   PyObject *__pyx_r = NULL;
   23887             :   __Pyx_RefNannyDeclarations
   23888         141 :   PyObject *__pyx_t_1 = NULL;
   23889         141 :   PyObject *__pyx_t_2 = NULL;
   23890         141 :   int __pyx_t_3;
   23891         141 :   __Pyx_memviewslice __pyx_t_4 = { 0, 0, { 0 }, { 0 }, { 0 } };
   23892         141 :   int __pyx_lineno = 0;
   23893         141 :   const char *__pyx_filename = NULL;
   23894         141 :   int __pyx_clineno = 0;
   23895         141 :   __Pyx_RefNannySetupContext("lu_dispatcher", 1);
   23896             : 
   23897             :   /* "scipy/linalg/_decomp_lu_cython.pyx":161
   23898             :  * @cython.initializedcheck(False)
   23899             :  * def lu_dispatcher(a, u, piv, permute_l):
   23900             :  *     if a.dtype.char == 'f':             # <<<<<<<<<<<<<<
   23901             :  *         lu_decompose[cnp.float32_t](a, u, piv, permute_l)
   23902             :  *     elif a.dtype.char == 'd':
   23903             :  */
   23904         141 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 161, __pyx_L1_error)
   23905         141 :   __Pyx_GOTREF(__pyx_t_1);
   23906         141 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_char); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 161, __pyx_L1_error)
   23907         141 :   __Pyx_GOTREF(__pyx_t_2);
   23908         141 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23909         141 :   __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_f, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 161, __pyx_L1_error)
   23910         141 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   23911         141 :   if (__pyx_t_3) {
   23912             : 
   23913             :     /* "scipy/linalg/_decomp_lu_cython.pyx":162
   23914             :  * def lu_dispatcher(a, u, piv, permute_l):
   23915             :  *     if a.dtype.char == 'f':
   23916             :  *         lu_decompose[cnp.float32_t](a, u, piv, permute_l)             # <<<<<<<<<<<<<<
   23917             :  *     elif a.dtype.char == 'd':
   23918             :  *         lu_decompose[cnp.float64_t](a, u, piv, permute_l)
   23919             :  */
   23920           6 :     if (!(likely(((__pyx_v_a) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_a, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 162, __pyx_L1_error)
   23921           6 :     if (!(likely(((__pyx_v_u) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_u, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 162, __pyx_L1_error)
   23922           6 :     __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_dc_int(__pyx_v_piv, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 162, __pyx_L1_error)
   23923           6 :     __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_permute_l); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 162, __pyx_L1_error)
   23924           6 :     __pyx_fuse_0__pyx_f_5scipy_6linalg_17_decomp_lu_cython_lu_decompose(((PyArrayObject *)__pyx_v_a), ((PyArrayObject *)__pyx_v_u), __pyx_t_4, __pyx_t_3);
   23925           6 :     __PYX_XCLEAR_MEMVIEW(&__pyx_t_4, 1);
   23926           6 :     __pyx_t_4.memview = NULL; __pyx_t_4.data = NULL;
   23927             : 
   23928             :     /* "scipy/linalg/_decomp_lu_cython.pyx":161
   23929             :  * @cython.initializedcheck(False)
   23930             :  * def lu_dispatcher(a, u, piv, permute_l):
   23931             :  *     if a.dtype.char == 'f':             # <<<<<<<<<<<<<<
   23932             :  *         lu_decompose[cnp.float32_t](a, u, piv, permute_l)
   23933             :  *     elif a.dtype.char == 'd':
   23934             :  */
   23935           6 :     goto __pyx_L3;
   23936             :   }
   23937             : 
   23938             :   /* "scipy/linalg/_decomp_lu_cython.pyx":163
   23939             :  *     if a.dtype.char == 'f':
   23940             :  *         lu_decompose[cnp.float32_t](a, u, piv, permute_l)
   23941             :  *     elif a.dtype.char == 'd':             # <<<<<<<<<<<<<<
   23942             :  *         lu_decompose[cnp.float64_t](a, u, piv, permute_l)
   23943             :  *     elif a.dtype.char == 'F':
   23944             :  */
   23945         135 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 163, __pyx_L1_error)
   23946         135 :   __Pyx_GOTREF(__pyx_t_2);
   23947         135 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_char); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 163, __pyx_L1_error)
   23948         135 :   __Pyx_GOTREF(__pyx_t_1);
   23949         135 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   23950         135 :   __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_d, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 163, __pyx_L1_error)
   23951         135 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23952         135 :   if (__pyx_t_3) {
   23953             : 
   23954             :     /* "scipy/linalg/_decomp_lu_cython.pyx":164
   23955             :  *         lu_decompose[cnp.float32_t](a, u, piv, permute_l)
   23956             :  *     elif a.dtype.char == 'd':
   23957             :  *         lu_decompose[cnp.float64_t](a, u, piv, permute_l)             # <<<<<<<<<<<<<<
   23958             :  *     elif a.dtype.char == 'F':
   23959             :  *         lu_decompose[cnp.complex64_t](a, u, piv, permute_l)
   23960             :  */
   23961          95 :     if (!(likely(((__pyx_v_a) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_a, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 164, __pyx_L1_error)
   23962          95 :     if (!(likely(((__pyx_v_u) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_u, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 164, __pyx_L1_error)
   23963          95 :     __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_dc_int(__pyx_v_piv, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 164, __pyx_L1_error)
   23964          95 :     __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_permute_l); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 164, __pyx_L1_error)
   23965          95 :     __pyx_fuse_1__pyx_f_5scipy_6linalg_17_decomp_lu_cython_lu_decompose(((PyArrayObject *)__pyx_v_a), ((PyArrayObject *)__pyx_v_u), __pyx_t_4, __pyx_t_3);
   23966          95 :     __PYX_XCLEAR_MEMVIEW(&__pyx_t_4, 1);
   23967          95 :     __pyx_t_4.memview = NULL; __pyx_t_4.data = NULL;
   23968             : 
   23969             :     /* "scipy/linalg/_decomp_lu_cython.pyx":163
   23970             :  *     if a.dtype.char == 'f':
   23971             :  *         lu_decompose[cnp.float32_t](a, u, piv, permute_l)
   23972             :  *     elif a.dtype.char == 'd':             # <<<<<<<<<<<<<<
   23973             :  *         lu_decompose[cnp.float64_t](a, u, piv, permute_l)
   23974             :  *     elif a.dtype.char == 'F':
   23975             :  */
   23976          95 :     goto __pyx_L3;
   23977             :   }
   23978             : 
   23979             :   /* "scipy/linalg/_decomp_lu_cython.pyx":165
   23980             :  *     elif a.dtype.char == 'd':
   23981             :  *         lu_decompose[cnp.float64_t](a, u, piv, permute_l)
   23982             :  *     elif a.dtype.char == 'F':             # <<<<<<<<<<<<<<
   23983             :  *         lu_decompose[cnp.complex64_t](a, u, piv, permute_l)
   23984             :  *     elif a.dtype.char == 'D':
   23985             :  */
   23986          40 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_dtype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error)
   23987          40 :   __Pyx_GOTREF(__pyx_t_1);
   23988          40 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_char); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 165, __pyx_L1_error)
   23989          40 :   __Pyx_GOTREF(__pyx_t_2);
   23990          40 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   23991          40 :   __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_F, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 165, __pyx_L1_error)
   23992          40 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   23993          40 :   if (__pyx_t_3) {
   23994             : 
   23995             :     /* "scipy/linalg/_decomp_lu_cython.pyx":166
   23996             :  *         lu_decompose[cnp.float64_t](a, u, piv, permute_l)
   23997             :  *     elif a.dtype.char == 'F':
   23998             :  *         lu_decompose[cnp.complex64_t](a, u, piv, permute_l)             # <<<<<<<<<<<<<<
   23999             :  *     elif a.dtype.char == 'D':
   24000             :  *         lu_decompose[cnp.complex128_t](a, u, piv, permute_l)
   24001             :  */
   24002           6 :     if (!(likely(((__pyx_v_a) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_a, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 166, __pyx_L1_error)
   24003           6 :     if (!(likely(((__pyx_v_u) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_u, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 166, __pyx_L1_error)
   24004           6 :     __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_dc_int(__pyx_v_piv, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 166, __pyx_L1_error)
   24005           6 :     __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_permute_l); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 166, __pyx_L1_error)
   24006           6 :     __pyx_fuse_2__pyx_f_5scipy_6linalg_17_decomp_lu_cython_lu_decompose(((PyArrayObject *)__pyx_v_a), ((PyArrayObject *)__pyx_v_u), __pyx_t_4, __pyx_t_3);
   24007           6 :     __PYX_XCLEAR_MEMVIEW(&__pyx_t_4, 1);
   24008           6 :     __pyx_t_4.memview = NULL; __pyx_t_4.data = NULL;
   24009             : 
   24010             :     /* "scipy/linalg/_decomp_lu_cython.pyx":165
   24011             :  *     elif a.dtype.char == 'd':
   24012             :  *         lu_decompose[cnp.float64_t](a, u, piv, permute_l)
   24013             :  *     elif a.dtype.char == 'F':             # <<<<<<<<<<<<<<
   24014             :  *         lu_decompose[cnp.complex64_t](a, u, piv, permute_l)
   24015             :  *     elif a.dtype.char == 'D':
   24016             :  */
   24017           6 :     goto __pyx_L3;
   24018             :   }
   24019             : 
   24020             :   /* "scipy/linalg/_decomp_lu_cython.pyx":167
   24021             :  *     elif a.dtype.char == 'F':
   24022             :  *         lu_decompose[cnp.complex64_t](a, u, piv, permute_l)
   24023             :  *     elif a.dtype.char == 'D':             # <<<<<<<<<<<<<<
   24024             :  *         lu_decompose[cnp.complex128_t](a, u, piv, permute_l)
   24025             :  *     else:
   24026             :  */
   24027          34 :   __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L1_error)
   24028          34 :   __Pyx_GOTREF(__pyx_t_2);
   24029          34 :   __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_char); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
   24030          34 :   __Pyx_GOTREF(__pyx_t_1);
   24031          34 :   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   24032          34 :   __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_D, Py_EQ)); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 167, __pyx_L1_error)
   24033          34 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   24034          34 :   if (likely(__pyx_t_3)) {
   24035             : 
   24036             :     /* "scipy/linalg/_decomp_lu_cython.pyx":168
   24037             :  *         lu_decompose[cnp.complex64_t](a, u, piv, permute_l)
   24038             :  *     elif a.dtype.char == 'D':
   24039             :  *         lu_decompose[cnp.complex128_t](a, u, piv, permute_l)             # <<<<<<<<<<<<<<
   24040             :  *     else:
   24041             :  *         raise TypeError("Unsupported type given to lu_dispatcher")
   24042             :  */
   24043          34 :     if (!(likely(((__pyx_v_a) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_a, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 168, __pyx_L1_error)
   24044          34 :     if (!(likely(((__pyx_v_u) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_u, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 168, __pyx_L1_error)
   24045          34 :     __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_dc_int(__pyx_v_piv, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 168, __pyx_L1_error)
   24046          34 :     __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_permute_l); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 168, __pyx_L1_error)
   24047          34 :     __pyx_fuse_3__pyx_f_5scipy_6linalg_17_decomp_lu_cython_lu_decompose(((PyArrayObject *)__pyx_v_a), ((PyArrayObject *)__pyx_v_u), __pyx_t_4, __pyx_t_3);
   24048          34 :     __PYX_XCLEAR_MEMVIEW(&__pyx_t_4, 1);
   24049          34 :     __pyx_t_4.memview = NULL; __pyx_t_4.data = NULL;
   24050             : 
   24051             :     /* "scipy/linalg/_decomp_lu_cython.pyx":167
   24052             :  *     elif a.dtype.char == 'F':
   24053             :  *         lu_decompose[cnp.complex64_t](a, u, piv, permute_l)
   24054             :  *     elif a.dtype.char == 'D':             # <<<<<<<<<<<<<<
   24055             :  *         lu_decompose[cnp.complex128_t](a, u, piv, permute_l)
   24056             :  *     else:
   24057             :  */
   24058          34 :     goto __pyx_L3;
   24059             :   }
   24060             : 
   24061             :   /* "scipy/linalg/_decomp_lu_cython.pyx":170
   24062             :  *         lu_decompose[cnp.complex128_t](a, u, piv, permute_l)
   24063             :  *     else:
   24064             :  *         raise TypeError("Unsupported type given to lu_dispatcher")             # <<<<<<<<<<<<<<
   24065             :  */
   24066             :   /*else*/ {
   24067           0 :     __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error)
   24068           0 :     __Pyx_GOTREF(__pyx_t_1);
   24069           0 :     __Pyx_Raise(__pyx_t_1, 0, 0, 0);
   24070           0 :     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   24071           0 :     __PYX_ERR(0, 170, __pyx_L1_error)
   24072             :   }
   24073         141 :   __pyx_L3:;
   24074             : 
   24075             :   /* "scipy/linalg/_decomp_lu_cython.pyx":158
   24076             :  * 
   24077             :  * 
   24078             :  * @cython.nonecheck(False)             # <<<<<<<<<<<<<<
   24079             :  * @cython.initializedcheck(False)
   24080             :  * def lu_dispatcher(a, u, piv, permute_l):
   24081             :  */
   24082             : 
   24083             :   /* function exit code */
   24084         141 :   __pyx_r = Py_None; __Pyx_INCREF(Py_None);
   24085         141 :   goto __pyx_L0;
   24086           0 :   __pyx_L1_error:;
   24087           0 :   __Pyx_XDECREF(__pyx_t_1);
   24088           0 :   __Pyx_XDECREF(__pyx_t_2);
   24089           0 :   __PYX_XCLEAR_MEMVIEW(&__pyx_t_4, 1);
   24090           0 :   __Pyx_AddTraceback("scipy.linalg._decomp_lu_cython.lu_dispatcher", __pyx_clineno, __pyx_lineno, __pyx_filename);
   24091           0 :   __pyx_r = NULL;
   24092         141 :   __pyx_L0:;
   24093         141 :   __Pyx_XGIVEREF(__pyx_r);
   24094         141 :   __Pyx_RefNannyFinishContext();
   24095         141 :   return __pyx_r;
   24096             : }
   24097             : static struct __pyx_vtabstruct_array __pyx_vtable_array;
   24098             : 
   24099           0 : static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k) {
   24100           0 :   struct __pyx_array_obj *p;
   24101           0 :   PyObject *o;
   24102             :   #if CYTHON_COMPILING_IN_LIMITED_API
   24103             :   allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
   24104             :   o = alloc_func(t, 0);
   24105             :   #else
   24106           0 :   if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
   24107           0 :     o = (*t->tp_alloc)(t, 0);
   24108             :   } else {
   24109           0 :     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
   24110             :   }
   24111           0 :   if (unlikely(!o)) return 0;
   24112             :   #endif
   24113           0 :   p = ((struct __pyx_array_obj *)o);
   24114           0 :   p->__pyx_vtab = __pyx_vtabptr_array;
   24115           0 :   p->mode = ((PyObject*)Py_None); Py_INCREF(Py_None);
   24116           0 :   p->_format = ((PyObject*)Py_None); Py_INCREF(Py_None);
   24117           0 :   if (unlikely(__pyx_array___cinit__(o, a, k) < 0)) goto bad;
   24118             :   return o;
   24119           0 :   bad:
   24120           0 :   Py_DECREF(o); o = 0;
   24121             :   return NULL;
   24122             : }
   24123             : 
   24124           0 : static void __pyx_tp_dealloc_array(PyObject *o) {
   24125           0 :   struct __pyx_array_obj *p = (struct __pyx_array_obj *)o;
   24126             :   #if CYTHON_USE_TP_FINALIZE
   24127           0 :   if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
   24128           0 :     if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_array) {
   24129           0 :       if (PyObject_CallFinalizerFromDealloc(o)) return;
   24130             :     }
   24131             :   }
   24132             :   #endif
   24133             :   {
   24134           0 :     PyObject *etype, *eval, *etb;
   24135           0 :     PyErr_Fetch(&etype, &eval, &etb);
   24136           0 :     __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
   24137           0 :     __pyx_array___dealloc__(o);
   24138           0 :     __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
   24139           0 :     PyErr_Restore(etype, eval, etb);
   24140             :   }
   24141           0 :   Py_CLEAR(p->mode);
   24142           0 :   Py_CLEAR(p->_format);
   24143             :   #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
   24144           0 :   (*Py_TYPE(o)->tp_free)(o);
   24145             :   #else
   24146             :   {
   24147             :     freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
   24148             :     if (tp_free) tp_free(o);
   24149             :   }
   24150             :   #endif
   24151             : }
   24152           0 : static PyObject *__pyx_sq_item_array(PyObject *o, Py_ssize_t i) {
   24153           0 :   PyObject *r;
   24154           0 :   PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
   24155           0 :   r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
   24156           0 :   Py_DECREF(x);
   24157             :   return r;
   24158             : }
   24159             : 
   24160           0 : static int __pyx_mp_ass_subscript_array(PyObject *o, PyObject *i, PyObject *v) {
   24161           0 :   if (v) {
   24162           0 :     return __pyx_array___setitem__(o, i, v);
   24163             :   }
   24164             :   else {
   24165           0 :     __Pyx_TypeName o_type_name;
   24166           0 :     o_type_name = __Pyx_PyType_GetName(Py_TYPE(o));
   24167           0 :     PyErr_Format(PyExc_NotImplementedError,
   24168             :       "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name);
   24169           0 :     __Pyx_DECREF_TypeName(o_type_name);
   24170           0 :     return -1;
   24171             :   }
   24172             : }
   24173             : 
   24174           0 : static PyObject *__pyx_tp_getattro_array(PyObject *o, PyObject *n) {
   24175           0 :   PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
   24176           0 :   if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
   24177           0 :     PyErr_Clear();
   24178           0 :     v = __pyx_array___getattr__(o, n);
   24179             :   }
   24180           0 :   return v;
   24181             : }
   24182             : 
   24183           0 : static PyObject *__pyx_getprop___pyx_array_memview(PyObject *o, CYTHON_UNUSED void *x) {
   24184           0 :   return __pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(o);
   24185             : }
   24186             : 
   24187             : static PyMethodDef __pyx_methods_array[] = {
   24188             :   {"__getattr__", (PyCFunction)__pyx_array___getattr__, METH_O|METH_COEXIST, 0},
   24189             :   {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_array_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   24190             :   {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_array_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   24191             :   {0, 0, 0, 0}
   24192             : };
   24193             : 
   24194             : static struct PyGetSetDef __pyx_getsets_array[] = {
   24195             :   {(char *)"memview", __pyx_getprop___pyx_array_memview, 0, (char *)0, 0},
   24196             :   {0, 0, 0, 0, 0}
   24197             : };
   24198             : #if CYTHON_USE_TYPE_SPECS
   24199             : #if !CYTHON_COMPILING_IN_LIMITED_API
   24200             : 
   24201             : static PyBufferProcs __pyx_tp_as_buffer_array = {
   24202             :   #if PY_MAJOR_VERSION < 3
   24203             :   0, /*bf_getreadbuffer*/
   24204             :   #endif
   24205             :   #if PY_MAJOR_VERSION < 3
   24206             :   0, /*bf_getwritebuffer*/
   24207             :   #endif
   24208             :   #if PY_MAJOR_VERSION < 3
   24209             :   0, /*bf_getsegcount*/
   24210             :   #endif
   24211             :   #if PY_MAJOR_VERSION < 3
   24212             :   0, /*bf_getcharbuffer*/
   24213             :   #endif
   24214             :   __pyx_array_getbuffer, /*bf_getbuffer*/
   24215             :   0, /*bf_releasebuffer*/
   24216             : };
   24217             : #endif
   24218             : static PyType_Slot __pyx_type___pyx_array_slots[] = {
   24219             :   {Py_tp_dealloc, (void *)__pyx_tp_dealloc_array},
   24220             :   {Py_sq_length, (void *)__pyx_array___len__},
   24221             :   {Py_sq_item, (void *)__pyx_sq_item_array},
   24222             :   {Py_mp_length, (void *)__pyx_array___len__},
   24223             :   {Py_mp_subscript, (void *)__pyx_array___getitem__},
   24224             :   {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_array},
   24225             :   {Py_tp_getattro, (void *)__pyx_tp_getattro_array},
   24226             :   #if defined(Py_bf_getbuffer)
   24227             :   {Py_bf_getbuffer, (void *)__pyx_array_getbuffer},
   24228             :   #endif
   24229             :   {Py_tp_methods, (void *)__pyx_methods_array},
   24230             :   {Py_tp_getset, (void *)__pyx_getsets_array},
   24231             :   {Py_tp_new, (void *)__pyx_tp_new_array},
   24232             :   {0, 0},
   24233             : };
   24234             : static PyType_Spec __pyx_type___pyx_array_spec = {
   24235             :   "scipy.linalg._decomp_lu_cython.array",
   24236             :   sizeof(struct __pyx_array_obj),
   24237             :   0,
   24238             :   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_SEQUENCE,
   24239             :   __pyx_type___pyx_array_slots,
   24240             : };
   24241             : #else
   24242             : 
   24243             : static PySequenceMethods __pyx_tp_as_sequence_array = {
   24244             :   __pyx_array___len__, /*sq_length*/
   24245             :   0, /*sq_concat*/
   24246             :   0, /*sq_repeat*/
   24247             :   __pyx_sq_item_array, /*sq_item*/
   24248             :   0, /*sq_slice*/
   24249             :   0, /*sq_ass_item*/
   24250             :   0, /*sq_ass_slice*/
   24251             :   0, /*sq_contains*/
   24252             :   0, /*sq_inplace_concat*/
   24253             :   0, /*sq_inplace_repeat*/
   24254             : };
   24255             : 
   24256             : static PyMappingMethods __pyx_tp_as_mapping_array = {
   24257             :   __pyx_array___len__, /*mp_length*/
   24258             :   __pyx_array___getitem__, /*mp_subscript*/
   24259             :   __pyx_mp_ass_subscript_array, /*mp_ass_subscript*/
   24260             : };
   24261             : 
   24262             : static PyBufferProcs __pyx_tp_as_buffer_array = {
   24263             :   #if PY_MAJOR_VERSION < 3
   24264             :   0, /*bf_getreadbuffer*/
   24265             :   #endif
   24266             :   #if PY_MAJOR_VERSION < 3
   24267             :   0, /*bf_getwritebuffer*/
   24268             :   #endif
   24269             :   #if PY_MAJOR_VERSION < 3
   24270             :   0, /*bf_getsegcount*/
   24271             :   #endif
   24272             :   #if PY_MAJOR_VERSION < 3
   24273             :   0, /*bf_getcharbuffer*/
   24274             :   #endif
   24275             :   __pyx_array_getbuffer, /*bf_getbuffer*/
   24276             :   0, /*bf_releasebuffer*/
   24277             : };
   24278             : 
   24279             : static PyTypeObject __pyx_type___pyx_array = {
   24280             :   PyVarObject_HEAD_INIT(0, 0)
   24281             :   "scipy.linalg._decomp_lu_cython.""array", /*tp_name*/
   24282             :   sizeof(struct __pyx_array_obj), /*tp_basicsize*/
   24283             :   0, /*tp_itemsize*/
   24284             :   __pyx_tp_dealloc_array, /*tp_dealloc*/
   24285             :   #if PY_VERSION_HEX < 0x030800b4
   24286             :   0, /*tp_print*/
   24287             :   #endif
   24288             :   #if PY_VERSION_HEX >= 0x030800b4
   24289             :   0, /*tp_vectorcall_offset*/
   24290             :   #endif
   24291             :   0, /*tp_getattr*/
   24292             :   0, /*tp_setattr*/
   24293             :   #if PY_MAJOR_VERSION < 3
   24294             :   0, /*tp_compare*/
   24295             :   #endif
   24296             :   #if PY_MAJOR_VERSION >= 3
   24297             :   0, /*tp_as_async*/
   24298             :   #endif
   24299             :   0, /*tp_repr*/
   24300             :   0, /*tp_as_number*/
   24301             :   &__pyx_tp_as_sequence_array, /*tp_as_sequence*/
   24302             :   &__pyx_tp_as_mapping_array, /*tp_as_mapping*/
   24303             :   0, /*tp_hash*/
   24304             :   0, /*tp_call*/
   24305             :   0, /*tp_str*/
   24306             :   __pyx_tp_getattro_array, /*tp_getattro*/
   24307             :   0, /*tp_setattro*/
   24308             :   &__pyx_tp_as_buffer_array, /*tp_as_buffer*/
   24309             :   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_SEQUENCE, /*tp_flags*/
   24310             :   0, /*tp_doc*/
   24311             :   0, /*tp_traverse*/
   24312             :   0, /*tp_clear*/
   24313             :   0, /*tp_richcompare*/
   24314             :   0, /*tp_weaklistoffset*/
   24315             :   0, /*tp_iter*/
   24316             :   0, /*tp_iternext*/
   24317             :   __pyx_methods_array, /*tp_methods*/
   24318             :   0, /*tp_members*/
   24319             :   __pyx_getsets_array, /*tp_getset*/
   24320             :   0, /*tp_base*/
   24321             :   0, /*tp_dict*/
   24322             :   0, /*tp_descr_get*/
   24323             :   0, /*tp_descr_set*/
   24324             :   #if !CYTHON_USE_TYPE_SPECS
   24325             :   0, /*tp_dictoffset*/
   24326             :   #endif
   24327             :   0, /*tp_init*/
   24328             :   0, /*tp_alloc*/
   24329             :   __pyx_tp_new_array, /*tp_new*/
   24330             :   0, /*tp_free*/
   24331             :   0, /*tp_is_gc*/
   24332             :   0, /*tp_bases*/
   24333             :   0, /*tp_mro*/
   24334             :   0, /*tp_cache*/
   24335             :   0, /*tp_subclasses*/
   24336             :   0, /*tp_weaklist*/
   24337             :   0, /*tp_del*/
   24338             :   0, /*tp_version_tag*/
   24339             :   #if PY_VERSION_HEX >= 0x030400a1
   24340             :   #if CYTHON_USE_TP_FINALIZE
   24341             :   0, /*tp_finalize*/
   24342             :   #else
   24343             :   NULL, /*tp_finalize*/
   24344             :   #endif
   24345             :   #endif
   24346             :   #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
   24347             :   0, /*tp_vectorcall*/
   24348             :   #endif
   24349             :   #if __PYX_NEED_TP_PRINT_SLOT == 1
   24350             :   0, /*tp_print*/
   24351             :   #endif
   24352             :   #if PY_VERSION_HEX >= 0x030C0000
   24353             :   0, /*tp_watched*/
   24354             :   #endif
   24355             :   #if PY_VERSION_HEX >= 0x030d00A4
   24356             :   0, /*tp_versions_used*/
   24357             :   #endif
   24358             :   #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
   24359             :   0, /*tp_pypy_flags*/
   24360             :   #endif
   24361             : };
   24362             : #endif
   24363             : 
   24364           5 : static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
   24365           5 :   struct __pyx_MemviewEnum_obj *p;
   24366           5 :   PyObject *o;
   24367             :   #if CYTHON_COMPILING_IN_LIMITED_API
   24368             :   allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
   24369             :   o = alloc_func(t, 0);
   24370             :   #else
   24371           5 :   if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
   24372           5 :     o = (*t->tp_alloc)(t, 0);
   24373             :   } else {
   24374           0 :     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
   24375             :   }
   24376           5 :   if (unlikely(!o)) return 0;
   24377             :   #endif
   24378           5 :   p = ((struct __pyx_MemviewEnum_obj *)o);
   24379           5 :   p->name = Py_None; Py_INCREF(Py_None);
   24380             :   return o;
   24381             : }
   24382             : 
   24383           0 : static void __pyx_tp_dealloc_Enum(PyObject *o) {
   24384           0 :   struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
   24385             :   #if CYTHON_USE_TP_FINALIZE
   24386           0 :   if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
   24387           0 :     if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_Enum) {
   24388           0 :       if (PyObject_CallFinalizerFromDealloc(o)) return;
   24389             :     }
   24390             :   }
   24391             :   #endif
   24392           0 :   PyObject_GC_UnTrack(o);
   24393           0 :   Py_CLEAR(p->name);
   24394             :   #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
   24395           0 :   (*Py_TYPE(o)->tp_free)(o);
   24396             :   #else
   24397             :   {
   24398             :     freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
   24399             :     if (tp_free) tp_free(o);
   24400             :   }
   24401             :   #endif
   24402             : }
   24403             : 
   24404         305 : static int __pyx_tp_traverse_Enum(PyObject *o, visitproc v, void *a) {
   24405         305 :   int e;
   24406         305 :   struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
   24407         305 :   if (p->name) {
   24408         305 :     e = (*v)(p->name, a); if (e) return e;
   24409             :   }
   24410             :   return 0;
   24411             : }
   24412             : 
   24413           0 : static int __pyx_tp_clear_Enum(PyObject *o) {
   24414           0 :   PyObject* tmp;
   24415           0 :   struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
   24416           0 :   tmp = ((PyObject*)p->name);
   24417           0 :   p->name = Py_None; Py_INCREF(Py_None);
   24418           0 :   Py_XDECREF(tmp);
   24419           0 :   return 0;
   24420             : }
   24421             : 
   24422           0 : static PyObject *__pyx_specialmethod___pyx_MemviewEnum___repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
   24423           0 :   return __pyx_MemviewEnum___repr__(self);
   24424             : }
   24425             : 
   24426             : static PyMethodDef __pyx_methods_Enum[] = {
   24427             :   {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_MemviewEnum___repr__, METH_NOARGS|METH_COEXIST, 0},
   24428             :   {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_MemviewEnum_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   24429             :   {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_MemviewEnum_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   24430             :   {0, 0, 0, 0}
   24431             : };
   24432             : #if CYTHON_USE_TYPE_SPECS
   24433             : static PyType_Slot __pyx_type___pyx_MemviewEnum_slots[] = {
   24434             :   {Py_tp_dealloc, (void *)__pyx_tp_dealloc_Enum},
   24435             :   {Py_tp_repr, (void *)__pyx_MemviewEnum___repr__},
   24436             :   {Py_tp_traverse, (void *)__pyx_tp_traverse_Enum},
   24437             :   {Py_tp_clear, (void *)__pyx_tp_clear_Enum},
   24438             :   {Py_tp_methods, (void *)__pyx_methods_Enum},
   24439             :   {Py_tp_init, (void *)__pyx_MemviewEnum___init__},
   24440             :   {Py_tp_new, (void *)__pyx_tp_new_Enum},
   24441             :   {0, 0},
   24442             : };
   24443             : static PyType_Spec __pyx_type___pyx_MemviewEnum_spec = {
   24444             :   "scipy.linalg._decomp_lu_cython.Enum",
   24445             :   sizeof(struct __pyx_MemviewEnum_obj),
   24446             :   0,
   24447             :   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
   24448             :   __pyx_type___pyx_MemviewEnum_slots,
   24449             : };
   24450             : #else
   24451             : 
   24452             : static PyTypeObject __pyx_type___pyx_MemviewEnum = {
   24453             :   PyVarObject_HEAD_INIT(0, 0)
   24454             :   "scipy.linalg._decomp_lu_cython.""Enum", /*tp_name*/
   24455             :   sizeof(struct __pyx_MemviewEnum_obj), /*tp_basicsize*/
   24456             :   0, /*tp_itemsize*/
   24457             :   __pyx_tp_dealloc_Enum, /*tp_dealloc*/
   24458             :   #if PY_VERSION_HEX < 0x030800b4
   24459             :   0, /*tp_print*/
   24460             :   #endif
   24461             :   #if PY_VERSION_HEX >= 0x030800b4
   24462             :   0, /*tp_vectorcall_offset*/
   24463             :   #endif
   24464             :   0, /*tp_getattr*/
   24465             :   0, /*tp_setattr*/
   24466             :   #if PY_MAJOR_VERSION < 3
   24467             :   0, /*tp_compare*/
   24468             :   #endif
   24469             :   #if PY_MAJOR_VERSION >= 3
   24470             :   0, /*tp_as_async*/
   24471             :   #endif
   24472             :   __pyx_MemviewEnum___repr__, /*tp_repr*/
   24473             :   0, /*tp_as_number*/
   24474             :   0, /*tp_as_sequence*/
   24475             :   0, /*tp_as_mapping*/
   24476             :   0, /*tp_hash*/
   24477             :   0, /*tp_call*/
   24478             :   0, /*tp_str*/
   24479             :   0, /*tp_getattro*/
   24480             :   0, /*tp_setattro*/
   24481             :   0, /*tp_as_buffer*/
   24482             :   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
   24483             :   0, /*tp_doc*/
   24484             :   __pyx_tp_traverse_Enum, /*tp_traverse*/
   24485             :   __pyx_tp_clear_Enum, /*tp_clear*/
   24486             :   0, /*tp_richcompare*/
   24487             :   0, /*tp_weaklistoffset*/
   24488             :   0, /*tp_iter*/
   24489             :   0, /*tp_iternext*/
   24490             :   __pyx_methods_Enum, /*tp_methods*/
   24491             :   0, /*tp_members*/
   24492             :   0, /*tp_getset*/
   24493             :   0, /*tp_base*/
   24494             :   0, /*tp_dict*/
   24495             :   0, /*tp_descr_get*/
   24496             :   0, /*tp_descr_set*/
   24497             :   #if !CYTHON_USE_TYPE_SPECS
   24498             :   0, /*tp_dictoffset*/
   24499             :   #endif
   24500             :   __pyx_MemviewEnum___init__, /*tp_init*/
   24501             :   0, /*tp_alloc*/
   24502             :   __pyx_tp_new_Enum, /*tp_new*/
   24503             :   0, /*tp_free*/
   24504             :   0, /*tp_is_gc*/
   24505             :   0, /*tp_bases*/
   24506             :   0, /*tp_mro*/
   24507             :   0, /*tp_cache*/
   24508             :   0, /*tp_subclasses*/
   24509             :   0, /*tp_weaklist*/
   24510             :   0, /*tp_del*/
   24511             :   0, /*tp_version_tag*/
   24512             :   #if PY_VERSION_HEX >= 0x030400a1
   24513             :   #if CYTHON_USE_TP_FINALIZE
   24514             :   0, /*tp_finalize*/
   24515             :   #else
   24516             :   NULL, /*tp_finalize*/
   24517             :   #endif
   24518             :   #endif
   24519             :   #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
   24520             :   0, /*tp_vectorcall*/
   24521             :   #endif
   24522             :   #if __PYX_NEED_TP_PRINT_SLOT == 1
   24523             :   0, /*tp_print*/
   24524             :   #endif
   24525             :   #if PY_VERSION_HEX >= 0x030C0000
   24526             :   0, /*tp_watched*/
   24527             :   #endif
   24528             :   #if PY_VERSION_HEX >= 0x030d00A4
   24529             :   0, /*tp_versions_used*/
   24530             :   #endif
   24531             :   #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
   24532             :   0, /*tp_pypy_flags*/
   24533             :   #endif
   24534             : };
   24535             : #endif
   24536             : static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;
   24537             : 
   24538         141 : static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k) {
   24539         141 :   struct __pyx_memoryview_obj *p;
   24540         141 :   PyObject *o;
   24541             :   #if CYTHON_COMPILING_IN_LIMITED_API
   24542             :   allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
   24543             :   o = alloc_func(t, 0);
   24544             :   #else
   24545         141 :   if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
   24546         141 :     o = (*t->tp_alloc)(t, 0);
   24547             :   } else {
   24548           0 :     o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
   24549             :   }
   24550         141 :   if (unlikely(!o)) return 0;
   24551             :   #endif
   24552         141 :   p = ((struct __pyx_memoryview_obj *)o);
   24553         141 :   p->__pyx_vtab = __pyx_vtabptr_memoryview;
   24554         141 :   p->obj = Py_None; Py_INCREF(Py_None);
   24555         141 :   p->_size = Py_None; Py_INCREF(Py_None);
   24556         141 :   p->_array_interface = Py_None; Py_INCREF(Py_None);
   24557         141 :   p->view.obj = NULL;
   24558         141 :   if (unlikely(__pyx_memoryview___cinit__(o, a, k) < 0)) goto bad;
   24559             :   return o;
   24560           0 :   bad:
   24561           0 :   Py_DECREF(o); o = 0;
   24562             :   return NULL;
   24563             : }
   24564             : 
   24565         141 : static void __pyx_tp_dealloc_memoryview(PyObject *o) {
   24566         141 :   struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
   24567             :   #if CYTHON_USE_TP_FINALIZE
   24568         141 :   if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
   24569           0 :     if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_memoryview) {
   24570           0 :       if (PyObject_CallFinalizerFromDealloc(o)) return;
   24571             :     }
   24572             :   }
   24573             :   #endif
   24574         141 :   PyObject_GC_UnTrack(o);
   24575             :   {
   24576         141 :     PyObject *etype, *eval, *etb;
   24577         141 :     PyErr_Fetch(&etype, &eval, &etb);
   24578         141 :     __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
   24579         141 :     __pyx_memoryview___dealloc__(o);
   24580         141 :     __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
   24581         141 :     PyErr_Restore(etype, eval, etb);
   24582             :   }
   24583         141 :   Py_CLEAR(p->obj);
   24584         141 :   Py_CLEAR(p->_size);
   24585         141 :   Py_CLEAR(p->_array_interface);
   24586             :   #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
   24587         141 :   (*Py_TYPE(o)->tp_free)(o);
   24588             :   #else
   24589             :   {
   24590             :     freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
   24591             :     if (tp_free) tp_free(o);
   24592             :   }
   24593             :   #endif
   24594             : }
   24595             : 
   24596           0 : static int __pyx_tp_traverse_memoryview(PyObject *o, visitproc v, void *a) {
   24597           0 :   int e;
   24598           0 :   struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
   24599           0 :   if (p->obj) {
   24600           0 :     e = (*v)(p->obj, a); if (e) return e;
   24601             :   }
   24602           0 :   if (p->_size) {
   24603           0 :     e = (*v)(p->_size, a); if (e) return e;
   24604             :   }
   24605           0 :   if (p->_array_interface) {
   24606           0 :     e = (*v)(p->_array_interface, a); if (e) return e;
   24607             :   }
   24608           0 :   if (p->view.obj) {
   24609           0 :     e = (*v)(p->view.obj, a); if (e) return e;
   24610             :   }
   24611             :   return 0;
   24612             : }
   24613             : 
   24614           0 : static int __pyx_tp_clear_memoryview(PyObject *o) {
   24615           0 :   PyObject* tmp;
   24616           0 :   struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
   24617           0 :   tmp = ((PyObject*)p->obj);
   24618           0 :   p->obj = Py_None; Py_INCREF(Py_None);
   24619           0 :   Py_XDECREF(tmp);
   24620           0 :   tmp = ((PyObject*)p->_size);
   24621           0 :   p->_size = Py_None; Py_INCREF(Py_None);
   24622           0 :   Py_XDECREF(tmp);
   24623           0 :   tmp = ((PyObject*)p->_array_interface);
   24624           0 :   p->_array_interface = Py_None; Py_INCREF(Py_None);
   24625           0 :   Py_XDECREF(tmp);
   24626           0 :   Py_CLEAR(p->view.obj);
   24627           0 :   return 0;
   24628             : }
   24629           0 : static PyObject *__pyx_sq_item_memoryview(PyObject *o, Py_ssize_t i) {
   24630           0 :   PyObject *r;
   24631           0 :   PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
   24632           0 :   r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
   24633           0 :   Py_DECREF(x);
   24634             :   return r;
   24635             : }
   24636             : 
   24637           0 : static int __pyx_mp_ass_subscript_memoryview(PyObject *o, PyObject *i, PyObject *v) {
   24638           0 :   if (v) {
   24639           0 :     return __pyx_memoryview___setitem__(o, i, v);
   24640             :   }
   24641             :   else {
   24642           0 :     __Pyx_TypeName o_type_name;
   24643           0 :     o_type_name = __Pyx_PyType_GetName(Py_TYPE(o));
   24644           0 :     PyErr_Format(PyExc_NotImplementedError,
   24645             :       "Subscript deletion not supported by " __Pyx_FMT_TYPENAME, o_type_name);
   24646           0 :     __Pyx_DECREF_TypeName(o_type_name);
   24647           0 :     return -1;
   24648             :   }
   24649             : }
   24650             : 
   24651           0 : static PyObject *__pyx_getprop___pyx_memoryview_T(PyObject *o, CYTHON_UNUSED void *x) {
   24652           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(o);
   24653             : }
   24654             : 
   24655           0 : static PyObject *__pyx_getprop___pyx_memoryview_base(PyObject *o, CYTHON_UNUSED void *x) {
   24656           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(o);
   24657             : }
   24658             : 
   24659           0 : static PyObject *__pyx_getprop___pyx_memoryview_shape(PyObject *o, CYTHON_UNUSED void *x) {
   24660           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(o);
   24661             : }
   24662             : 
   24663           0 : static PyObject *__pyx_getprop___pyx_memoryview_strides(PyObject *o, CYTHON_UNUSED void *x) {
   24664           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(o);
   24665             : }
   24666             : 
   24667           0 : static PyObject *__pyx_getprop___pyx_memoryview_suboffsets(PyObject *o, CYTHON_UNUSED void *x) {
   24668           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(o);
   24669             : }
   24670             : 
   24671           0 : static PyObject *__pyx_getprop___pyx_memoryview_ndim(PyObject *o, CYTHON_UNUSED void *x) {
   24672           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(o);
   24673             : }
   24674             : 
   24675           0 : static PyObject *__pyx_getprop___pyx_memoryview_itemsize(PyObject *o, CYTHON_UNUSED void *x) {
   24676           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(o);
   24677             : }
   24678             : 
   24679           0 : static PyObject *__pyx_getprop___pyx_memoryview_nbytes(PyObject *o, CYTHON_UNUSED void *x) {
   24680           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(o);
   24681             : }
   24682             : 
   24683           0 : static PyObject *__pyx_getprop___pyx_memoryview_size(PyObject *o, CYTHON_UNUSED void *x) {
   24684           0 :   return __pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(o);
   24685             : }
   24686             : 
   24687           0 : static PyObject *__pyx_specialmethod___pyx_memoryview___repr__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
   24688           0 :   return __pyx_memoryview___repr__(self);
   24689             : }
   24690             : 
   24691             : static PyMethodDef __pyx_methods_memoryview[] = {
   24692             :   {"__repr__", (PyCFunction)__pyx_specialmethod___pyx_memoryview___repr__, METH_NOARGS|METH_COEXIST, 0},
   24693             :   {"is_c_contig", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_is_c_contig, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   24694             :   {"is_f_contig", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_is_f_contig, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   24695             :   {"copy", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_copy, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   24696             :   {"copy_fortran", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_memoryview_copy_fortran, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   24697             :   {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryview_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   24698             :   {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryview_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   24699             :   {0, 0, 0, 0}
   24700             : };
   24701             : 
   24702             : static struct PyGetSetDef __pyx_getsets_memoryview[] = {
   24703             :   {(char *)"T", __pyx_getprop___pyx_memoryview_T, 0, (char *)0, 0},
   24704             :   {(char *)"base", __pyx_getprop___pyx_memoryview_base, 0, (char *)0, 0},
   24705             :   {(char *)"shape", __pyx_getprop___pyx_memoryview_shape, 0, (char *)0, 0},
   24706             :   {(char *)"strides", __pyx_getprop___pyx_memoryview_strides, 0, (char *)0, 0},
   24707             :   {(char *)"suboffsets", __pyx_getprop___pyx_memoryview_suboffsets, 0, (char *)0, 0},
   24708             :   {(char *)"ndim", __pyx_getprop___pyx_memoryview_ndim, 0, (char *)0, 0},
   24709             :   {(char *)"itemsize", __pyx_getprop___pyx_memoryview_itemsize, 0, (char *)0, 0},
   24710             :   {(char *)"nbytes", __pyx_getprop___pyx_memoryview_nbytes, 0, (char *)0, 0},
   24711             :   {(char *)"size", __pyx_getprop___pyx_memoryview_size, 0, (char *)0, 0},
   24712             :   {0, 0, 0, 0, 0}
   24713             : };
   24714             : #if CYTHON_USE_TYPE_SPECS
   24715             : #if !CYTHON_COMPILING_IN_LIMITED_API
   24716             : 
   24717             : static PyBufferProcs __pyx_tp_as_buffer_memoryview = {
   24718             :   #if PY_MAJOR_VERSION < 3
   24719             :   0, /*bf_getreadbuffer*/
   24720             :   #endif
   24721             :   #if PY_MAJOR_VERSION < 3
   24722             :   0, /*bf_getwritebuffer*/
   24723             :   #endif
   24724             :   #if PY_MAJOR_VERSION < 3
   24725             :   0, /*bf_getsegcount*/
   24726             :   #endif
   24727             :   #if PY_MAJOR_VERSION < 3
   24728             :   0, /*bf_getcharbuffer*/
   24729             :   #endif
   24730             :   __pyx_memoryview_getbuffer, /*bf_getbuffer*/
   24731             :   0, /*bf_releasebuffer*/
   24732             : };
   24733             : #endif
   24734             : static PyType_Slot __pyx_type___pyx_memoryview_slots[] = {
   24735             :   {Py_tp_dealloc, (void *)__pyx_tp_dealloc_memoryview},
   24736             :   {Py_tp_repr, (void *)__pyx_memoryview___repr__},
   24737             :   {Py_sq_length, (void *)__pyx_memoryview___len__},
   24738             :   {Py_sq_item, (void *)__pyx_sq_item_memoryview},
   24739             :   {Py_mp_length, (void *)__pyx_memoryview___len__},
   24740             :   {Py_mp_subscript, (void *)__pyx_memoryview___getitem__},
   24741             :   {Py_mp_ass_subscript, (void *)__pyx_mp_ass_subscript_memoryview},
   24742             :   {Py_tp_str, (void *)__pyx_memoryview___str__},
   24743             :   #if defined(Py_bf_getbuffer)
   24744             :   {Py_bf_getbuffer, (void *)__pyx_memoryview_getbuffer},
   24745             :   #endif
   24746             :   {Py_tp_traverse, (void *)__pyx_tp_traverse_memoryview},
   24747             :   {Py_tp_clear, (void *)__pyx_tp_clear_memoryview},
   24748             :   {Py_tp_methods, (void *)__pyx_methods_memoryview},
   24749             :   {Py_tp_getset, (void *)__pyx_getsets_memoryview},
   24750             :   {Py_tp_new, (void *)__pyx_tp_new_memoryview},
   24751             :   {0, 0},
   24752             : };
   24753             : static PyType_Spec __pyx_type___pyx_memoryview_spec = {
   24754             :   "scipy.linalg._decomp_lu_cython.memoryview",
   24755             :   sizeof(struct __pyx_memoryview_obj),
   24756             :   0,
   24757             :   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
   24758             :   __pyx_type___pyx_memoryview_slots,
   24759             : };
   24760             : #else
   24761             : 
   24762             : static PySequenceMethods __pyx_tp_as_sequence_memoryview = {
   24763             :   __pyx_memoryview___len__, /*sq_length*/
   24764             :   0, /*sq_concat*/
   24765             :   0, /*sq_repeat*/
   24766             :   __pyx_sq_item_memoryview, /*sq_item*/
   24767             :   0, /*sq_slice*/
   24768             :   0, /*sq_ass_item*/
   24769             :   0, /*sq_ass_slice*/
   24770             :   0, /*sq_contains*/
   24771             :   0, /*sq_inplace_concat*/
   24772             :   0, /*sq_inplace_repeat*/
   24773             : };
   24774             : 
   24775             : static PyMappingMethods __pyx_tp_as_mapping_memoryview = {
   24776             :   __pyx_memoryview___len__, /*mp_length*/
   24777             :   __pyx_memoryview___getitem__, /*mp_subscript*/
   24778             :   __pyx_mp_ass_subscript_memoryview, /*mp_ass_subscript*/
   24779             : };
   24780             : 
   24781             : static PyBufferProcs __pyx_tp_as_buffer_memoryview = {
   24782             :   #if PY_MAJOR_VERSION < 3
   24783             :   0, /*bf_getreadbuffer*/
   24784             :   #endif
   24785             :   #if PY_MAJOR_VERSION < 3
   24786             :   0, /*bf_getwritebuffer*/
   24787             :   #endif
   24788             :   #if PY_MAJOR_VERSION < 3
   24789             :   0, /*bf_getsegcount*/
   24790             :   #endif
   24791             :   #if PY_MAJOR_VERSION < 3
   24792             :   0, /*bf_getcharbuffer*/
   24793             :   #endif
   24794             :   __pyx_memoryview_getbuffer, /*bf_getbuffer*/
   24795             :   0, /*bf_releasebuffer*/
   24796             : };
   24797             : 
   24798             : static PyTypeObject __pyx_type___pyx_memoryview = {
   24799             :   PyVarObject_HEAD_INIT(0, 0)
   24800             :   "scipy.linalg._decomp_lu_cython.""memoryview", /*tp_name*/
   24801             :   sizeof(struct __pyx_memoryview_obj), /*tp_basicsize*/
   24802             :   0, /*tp_itemsize*/
   24803             :   __pyx_tp_dealloc_memoryview, /*tp_dealloc*/
   24804             :   #if PY_VERSION_HEX < 0x030800b4
   24805             :   0, /*tp_print*/
   24806             :   #endif
   24807             :   #if PY_VERSION_HEX >= 0x030800b4
   24808             :   0, /*tp_vectorcall_offset*/
   24809             :   #endif
   24810             :   0, /*tp_getattr*/
   24811             :   0, /*tp_setattr*/
   24812             :   #if PY_MAJOR_VERSION < 3
   24813             :   0, /*tp_compare*/
   24814             :   #endif
   24815             :   #if PY_MAJOR_VERSION >= 3
   24816             :   0, /*tp_as_async*/
   24817             :   #endif
   24818             :   __pyx_memoryview___repr__, /*tp_repr*/
   24819             :   0, /*tp_as_number*/
   24820             :   &__pyx_tp_as_sequence_memoryview, /*tp_as_sequence*/
   24821             :   &__pyx_tp_as_mapping_memoryview, /*tp_as_mapping*/
   24822             :   0, /*tp_hash*/
   24823             :   0, /*tp_call*/
   24824             :   __pyx_memoryview___str__, /*tp_str*/
   24825             :   0, /*tp_getattro*/
   24826             :   0, /*tp_setattro*/
   24827             :   &__pyx_tp_as_buffer_memoryview, /*tp_as_buffer*/
   24828             :   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
   24829             :   0, /*tp_doc*/
   24830             :   __pyx_tp_traverse_memoryview, /*tp_traverse*/
   24831             :   __pyx_tp_clear_memoryview, /*tp_clear*/
   24832             :   0, /*tp_richcompare*/
   24833             :   0, /*tp_weaklistoffset*/
   24834             :   0, /*tp_iter*/
   24835             :   0, /*tp_iternext*/
   24836             :   __pyx_methods_memoryview, /*tp_methods*/
   24837             :   0, /*tp_members*/
   24838             :   __pyx_getsets_memoryview, /*tp_getset*/
   24839             :   0, /*tp_base*/
   24840             :   0, /*tp_dict*/
   24841             :   0, /*tp_descr_get*/
   24842             :   0, /*tp_descr_set*/
   24843             :   #if !CYTHON_USE_TYPE_SPECS
   24844             :   0, /*tp_dictoffset*/
   24845             :   #endif
   24846             :   0, /*tp_init*/
   24847             :   0, /*tp_alloc*/
   24848             :   __pyx_tp_new_memoryview, /*tp_new*/
   24849             :   0, /*tp_free*/
   24850             :   0, /*tp_is_gc*/
   24851             :   0, /*tp_bases*/
   24852             :   0, /*tp_mro*/
   24853             :   0, /*tp_cache*/
   24854             :   0, /*tp_subclasses*/
   24855             :   0, /*tp_weaklist*/
   24856             :   0, /*tp_del*/
   24857             :   0, /*tp_version_tag*/
   24858             :   #if PY_VERSION_HEX >= 0x030400a1
   24859             :   #if CYTHON_USE_TP_FINALIZE
   24860             :   0, /*tp_finalize*/
   24861             :   #else
   24862             :   NULL, /*tp_finalize*/
   24863             :   #endif
   24864             :   #endif
   24865             :   #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
   24866             :   0, /*tp_vectorcall*/
   24867             :   #endif
   24868             :   #if __PYX_NEED_TP_PRINT_SLOT == 1
   24869             :   0, /*tp_print*/
   24870             :   #endif
   24871             :   #if PY_VERSION_HEX >= 0x030C0000
   24872             :   0, /*tp_watched*/
   24873             :   #endif
   24874             :   #if PY_VERSION_HEX >= 0x030d00A4
   24875             :   0, /*tp_versions_used*/
   24876             :   #endif
   24877             :   #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
   24878             :   0, /*tp_pypy_flags*/
   24879             :   #endif
   24880             : };
   24881             : #endif
   24882             : static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;
   24883             : 
   24884           0 : static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k) {
   24885           0 :   struct __pyx_memoryviewslice_obj *p;
   24886           0 :   PyObject *o = __pyx_tp_new_memoryview(t, a, k);
   24887           0 :   if (unlikely(!o)) return 0;
   24888           0 :   p = ((struct __pyx_memoryviewslice_obj *)o);
   24889           0 :   p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_memoryview*)__pyx_vtabptr__memoryviewslice;
   24890           0 :   p->from_object = Py_None; Py_INCREF(Py_None);
   24891           0 :   p->from_slice.memview = NULL;
   24892           0 :   return o;
   24893             : }
   24894             : 
   24895           0 : static void __pyx_tp_dealloc__memoryviewslice(PyObject *o) {
   24896           0 :   struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
   24897             :   #if CYTHON_USE_TP_FINALIZE
   24898           0 :   if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
   24899           0 :     if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc__memoryviewslice) {
   24900           0 :       if (PyObject_CallFinalizerFromDealloc(o)) return;
   24901             :     }
   24902             :   }
   24903             :   #endif
   24904           0 :   PyObject_GC_UnTrack(o);
   24905             :   {
   24906           0 :     PyObject *etype, *eval, *etb;
   24907           0 :     PyErr_Fetch(&etype, &eval, &etb);
   24908           0 :     __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
   24909           0 :     __pyx_memoryviewslice___dealloc__(o);
   24910           0 :     __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
   24911           0 :     PyErr_Restore(etype, eval, etb);
   24912             :   }
   24913           0 :   Py_CLEAR(p->from_object);
   24914           0 :   PyObject_GC_Track(o);
   24915           0 :   __pyx_tp_dealloc_memoryview(o);
   24916             : }
   24917             : 
   24918           0 : static int __pyx_tp_traverse__memoryviewslice(PyObject *o, visitproc v, void *a) {
   24919           0 :   int e;
   24920           0 :   struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
   24921           0 :   e = __pyx_tp_traverse_memoryview(o, v, a); if (e) return e;
   24922           0 :   if (p->from_object) {
   24923           0 :     e = (*v)(p->from_object, a); if (e) return e;
   24924             :   }
   24925             :   return 0;
   24926             : }
   24927             : 
   24928           0 : static int __pyx_tp_clear__memoryviewslice(PyObject *o) {
   24929           0 :   PyObject* tmp;
   24930           0 :   struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
   24931           0 :   __pyx_tp_clear_memoryview(o);
   24932           0 :   tmp = ((PyObject*)p->from_object);
   24933           0 :   p->from_object = Py_None; Py_INCREF(Py_None);
   24934           0 :   Py_XDECREF(tmp);
   24935           0 :   __PYX_XCLEAR_MEMVIEW(&p->from_slice, 1);
   24936           0 :   return 0;
   24937             : }
   24938             : 
   24939             : static PyMethodDef __pyx_methods__memoryviewslice[] = {
   24940             :   {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryviewslice_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   24941             :   {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw___pyx_memoryviewslice_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0},
   24942             :   {0, 0, 0, 0}
   24943             : };
   24944             : #if CYTHON_USE_TYPE_SPECS
   24945             : static PyType_Slot __pyx_type___pyx_memoryviewslice_slots[] = {
   24946             :   {Py_tp_dealloc, (void *)__pyx_tp_dealloc__memoryviewslice},
   24947             :   {Py_tp_doc, (void *)PyDoc_STR("Internal class for passing memoryview slices to Python")},
   24948             :   {Py_tp_traverse, (void *)__pyx_tp_traverse__memoryviewslice},
   24949             :   {Py_tp_clear, (void *)__pyx_tp_clear__memoryviewslice},
   24950             :   {Py_tp_methods, (void *)__pyx_methods__memoryviewslice},
   24951             :   {Py_tp_new, (void *)__pyx_tp_new__memoryviewslice},
   24952             :   {0, 0},
   24953             : };
   24954             : static PyType_Spec __pyx_type___pyx_memoryviewslice_spec = {
   24955             :   "scipy.linalg._decomp_lu_cython._memoryviewslice",
   24956             :   sizeof(struct __pyx_memoryviewslice_obj),
   24957             :   0,
   24958             :   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_SEQUENCE,
   24959             :   __pyx_type___pyx_memoryviewslice_slots,
   24960             : };
   24961             : #else
   24962             : 
   24963             : static PyTypeObject __pyx_type___pyx_memoryviewslice = {
   24964             :   PyVarObject_HEAD_INIT(0, 0)
   24965             :   "scipy.linalg._decomp_lu_cython.""_memoryviewslice", /*tp_name*/
   24966             :   sizeof(struct __pyx_memoryviewslice_obj), /*tp_basicsize*/
   24967             :   0, /*tp_itemsize*/
   24968             :   __pyx_tp_dealloc__memoryviewslice, /*tp_dealloc*/
   24969             :   #if PY_VERSION_HEX < 0x030800b4
   24970             :   0, /*tp_print*/
   24971             :   #endif
   24972             :   #if PY_VERSION_HEX >= 0x030800b4
   24973             :   0, /*tp_vectorcall_offset*/
   24974             :   #endif
   24975             :   0, /*tp_getattr*/
   24976             :   0, /*tp_setattr*/
   24977             :   #if PY_MAJOR_VERSION < 3
   24978             :   0, /*tp_compare*/
   24979             :   #endif
   24980             :   #if PY_MAJOR_VERSION >= 3
   24981             :   0, /*tp_as_async*/
   24982             :   #endif
   24983             :   #if CYTHON_COMPILING_IN_PYPY || 0
   24984             :   __pyx_memoryview___repr__, /*tp_repr*/
   24985             :   #else
   24986             :   0, /*tp_repr*/
   24987             :   #endif
   24988             :   0, /*tp_as_number*/
   24989             :   0, /*tp_as_sequence*/
   24990             :   0, /*tp_as_mapping*/
   24991             :   0, /*tp_hash*/
   24992             :   0, /*tp_call*/
   24993             :   #if CYTHON_COMPILING_IN_PYPY || 0
   24994             :   __pyx_memoryview___str__, /*tp_str*/
   24995             :   #else
   24996             :   0, /*tp_str*/
   24997             :   #endif
   24998             :   0, /*tp_getattro*/
   24999             :   0, /*tp_setattro*/
   25000             :   0, /*tp_as_buffer*/
   25001             :   Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_SEQUENCE, /*tp_flags*/
   25002             :   PyDoc_STR("Internal class for passing memoryview slices to Python"), /*tp_doc*/
   25003             :   __pyx_tp_traverse__memoryviewslice, /*tp_traverse*/
   25004             :   __pyx_tp_clear__memoryviewslice, /*tp_clear*/
   25005             :   0, /*tp_richcompare*/
   25006             :   0, /*tp_weaklistoffset*/
   25007             :   0, /*tp_iter*/
   25008             :   0, /*tp_iternext*/
   25009             :   __pyx_methods__memoryviewslice, /*tp_methods*/
   25010             :   0, /*tp_members*/
   25011             :   0, /*tp_getset*/
   25012             :   0, /*tp_base*/
   25013             :   0, /*tp_dict*/
   25014             :   0, /*tp_descr_get*/
   25015             :   0, /*tp_descr_set*/
   25016             :   #if !CYTHON_USE_TYPE_SPECS
   25017             :   0, /*tp_dictoffset*/
   25018             :   #endif
   25019             :   0, /*tp_init*/
   25020             :   0, /*tp_alloc*/
   25021             :   __pyx_tp_new__memoryviewslice, /*tp_new*/
   25022             :   0, /*tp_free*/
   25023             :   0, /*tp_is_gc*/
   25024             :   0, /*tp_bases*/
   25025             :   0, /*tp_mro*/
   25026             :   0, /*tp_cache*/
   25027             :   0, /*tp_subclasses*/
   25028             :   0, /*tp_weaklist*/
   25029             :   0, /*tp_del*/
   25030             :   0, /*tp_version_tag*/
   25031             :   #if PY_VERSION_HEX >= 0x030400a1
   25032             :   #if CYTHON_USE_TP_FINALIZE
   25033             :   0, /*tp_finalize*/
   25034             :   #else
   25035             :   NULL, /*tp_finalize*/
   25036             :   #endif
   25037             :   #endif
   25038             :   #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
   25039             :   0, /*tp_vectorcall*/
   25040             :   #endif
   25041             :   #if __PYX_NEED_TP_PRINT_SLOT == 1
   25042             :   0, /*tp_print*/
   25043             :   #endif
   25044             :   #if PY_VERSION_HEX >= 0x030C0000
   25045             :   0, /*tp_watched*/
   25046             :   #endif
   25047             :   #if PY_VERSION_HEX >= 0x030d00A4
   25048             :   0, /*tp_versions_used*/
   25049             :   #endif
   25050             :   #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
   25051             :   0, /*tp_pypy_flags*/
   25052             :   #endif
   25053             : };
   25054             : #endif
   25055             : 
   25056             : static PyMethodDef __pyx_methods[] = {
   25057             :   {0, 0, 0, 0}
   25058             : };
   25059             : #ifndef CYTHON_SMALL_CODE
   25060             : #if defined(__clang__)
   25061             :     #define CYTHON_SMALL_CODE
   25062             : #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
   25063             :     #define CYTHON_SMALL_CODE __attribute__((cold))
   25064             : #else
   25065             :     #define CYTHON_SMALL_CODE
   25066             : #endif
   25067             : #endif
   25068             : /* #### Code section: pystring_table ### */
   25069             : 
   25070           1 : static int __Pyx_CreateStringTabAndInitStrings(void) {
   25071           1 :   __Pyx_StringTabEntry __pyx_string_tab[] = {
   25072           1 :     {&__pyx_kp_u_, __pyx_k_, sizeof(__pyx_k_), 0, 1, 0, 0},
   25073           1 :     {&__pyx_n_s_ASCII, __pyx_k_ASCII, sizeof(__pyx_k_ASCII), 0, 0, 1, 1},
   25074           1 :     {&__pyx_kp_s_All_dimensions_preceding_dimensi, __pyx_k_All_dimensions_preceding_dimensi, sizeof(__pyx_k_All_dimensions_preceding_dimensi), 0, 0, 1, 0},
   25075           1 :     {&__pyx_n_s_AssertionError, __pyx_k_AssertionError, sizeof(__pyx_k_AssertionError), 0, 0, 1, 1},
   25076           1 :     {&__pyx_kp_s_Buffer_view_does_not_expose_stri, __pyx_k_Buffer_view_does_not_expose_stri, sizeof(__pyx_k_Buffer_view_does_not_expose_stri), 0, 0, 1, 0},
   25077           1 :     {&__pyx_kp_s_Can_only_create_a_buffer_that_is, __pyx_k_Can_only_create_a_buffer_that_is, sizeof(__pyx_k_Can_only_create_a_buffer_that_is), 0, 0, 1, 0},
   25078           1 :     {&__pyx_kp_s_Cannot_assign_to_read_only_memor, __pyx_k_Cannot_assign_to_read_only_memor, sizeof(__pyx_k_Cannot_assign_to_read_only_memor), 0, 0, 1, 0},
   25079           1 :     {&__pyx_kp_s_Cannot_create_writable_memory_vi, __pyx_k_Cannot_create_writable_memory_vi, sizeof(__pyx_k_Cannot_create_writable_memory_vi), 0, 0, 1, 0},
   25080           1 :     {&__pyx_kp_u_Cannot_index_with_type, __pyx_k_Cannot_index_with_type, sizeof(__pyx_k_Cannot_index_with_type), 0, 1, 0, 0},
   25081           1 :     {&__pyx_kp_s_Cannot_transpose_memoryview_with, __pyx_k_Cannot_transpose_memoryview_with, sizeof(__pyx_k_Cannot_transpose_memoryview_with), 0, 0, 1, 0},
   25082           1 :     {&__pyx_n_u_D, __pyx_k_D, sizeof(__pyx_k_D), 0, 1, 0, 1},
   25083           1 :     {&__pyx_kp_s_Dimension_d_is_not_direct, __pyx_k_Dimension_d_is_not_direct, sizeof(__pyx_k_Dimension_d_is_not_direct), 0, 0, 1, 0},
   25084           1 :     {&__pyx_n_s_Ellipsis, __pyx_k_Ellipsis, sizeof(__pyx_k_Ellipsis), 0, 0, 1, 1},
   25085           1 :     {&__pyx_kp_s_Empty_shape_tuple_for_cython_arr, __pyx_k_Empty_shape_tuple_for_cython_arr, sizeof(__pyx_k_Empty_shape_tuple_for_cython_arr), 0, 0, 1, 0},
   25086           1 :     {&__pyx_n_u_F, __pyx_k_F, sizeof(__pyx_k_F), 0, 1, 0, 1},
   25087           1 :     {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
   25088           1 :     {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_k_Incompatible_checksums_0x_x_vs_0, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0), 0, 0, 1, 0},
   25089           1 :     {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
   25090           1 :     {&__pyx_kp_s_Index_out_of_bounds_axis_d, __pyx_k_Index_out_of_bounds_axis_d, sizeof(__pyx_k_Index_out_of_bounds_axis_d), 0, 0, 1, 0},
   25091           1 :     {&__pyx_kp_s_Indirect_dimensions_not_supporte, __pyx_k_Indirect_dimensions_not_supporte, sizeof(__pyx_k_Indirect_dimensions_not_supporte), 0, 0, 1, 0},
   25092           1 :     {&__pyx_kp_u_Invalid_mode_expected_c_or_fortr, __pyx_k_Invalid_mode_expected_c_or_fortr, sizeof(__pyx_k_Invalid_mode_expected_c_or_fortr), 0, 1, 0, 0},
   25093           1 :     {&__pyx_kp_u_Invalid_shape_in_axis, __pyx_k_Invalid_shape_in_axis, sizeof(__pyx_k_Invalid_shape_in_axis), 0, 1, 0, 0},
   25094           1 :     {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
   25095           1 :     {&__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_k_MemoryView_of_r_at_0x_x, sizeof(__pyx_k_MemoryView_of_r_at_0x_x), 0, 0, 1, 0},
   25096           1 :     {&__pyx_kp_s_MemoryView_of_r_object, __pyx_k_MemoryView_of_r_object, sizeof(__pyx_k_MemoryView_of_r_object), 0, 0, 1, 0},
   25097           1 :     {&__pyx_n_b_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 0, 1},
   25098           1 :     {&__pyx_kp_u_Out_of_bounds_on_buffer_access_a, __pyx_k_Out_of_bounds_on_buffer_access_a, sizeof(__pyx_k_Out_of_bounds_on_buffer_access_a), 0, 1, 0, 0},
   25099           1 :     {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
   25100           1 :     {&__pyx_n_s_Sequence, __pyx_k_Sequence, sizeof(__pyx_k_Sequence), 0, 0, 1, 1},
   25101           1 :     {&__pyx_kp_s_Step_may_not_be_zero_axis_d, __pyx_k_Step_may_not_be_zero_axis_d, sizeof(__pyx_k_Step_may_not_be_zero_axis_d), 0, 0, 1, 0},
   25102           1 :     {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
   25103           1 :     {&__pyx_kp_s_Unable_to_convert_item_to_object, __pyx_k_Unable_to_convert_item_to_object, sizeof(__pyx_k_Unable_to_convert_item_to_object), 0, 0, 1, 0},
   25104           1 :     {&__pyx_kp_u_Unsupported_type_given_to_lu_dis, __pyx_k_Unsupported_type_given_to_lu_dis, sizeof(__pyx_k_Unsupported_type_given_to_lu_dis), 0, 1, 0, 0},
   25105           1 :     {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
   25106           1 :     {&__pyx_n_s_View_MemoryView, __pyx_k_View_MemoryView, sizeof(__pyx_k_View_MemoryView), 0, 0, 1, 1},
   25107           1 :     {&__pyx_kp_u__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0, 0},
   25108           1 :     {&__pyx_n_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 1},
   25109           1 :     {&__pyx_kp_u__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 1, 0, 0},
   25110           1 :     {&__pyx_kp_u__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 1, 0, 0},
   25111           1 :     {&__pyx_n_s__74, __pyx_k__74, sizeof(__pyx_k__74), 0, 0, 1, 1},
   25112           1 :     {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1},
   25113           1 :     {&__pyx_n_s_abc, __pyx_k_abc, sizeof(__pyx_k_abc), 0, 0, 1, 1},
   25114           1 :     {&__pyx_n_s_allocate_buffer, __pyx_k_allocate_buffer, sizeof(__pyx_k_allocate_buffer), 0, 0, 1, 1},
   25115           1 :     {&__pyx_kp_u_and, __pyx_k_and, sizeof(__pyx_k_and), 0, 1, 0, 0},
   25116           1 :     {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1},
   25117           1 :     {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1},
   25118           1 :     {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
   25119           1 :     {&__pyx_n_u_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 1, 0, 1},
   25120           1 :     {&__pyx_n_s_char, __pyx_k_char, sizeof(__pyx_k_char), 0, 0, 1, 1},
   25121           1 :     {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
   25122           1 :     {&__pyx_n_s_class_getitem, __pyx_k_class_getitem, sizeof(__pyx_k_class_getitem), 0, 0, 1, 1},
   25123           1 :     {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
   25124           1 :     {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
   25125           1 :     {&__pyx_kp_s_collections_abc, __pyx_k_collections_abc, sizeof(__pyx_k_collections_abc), 0, 0, 1, 0},
   25126           1 :     {&__pyx_kp_s_contiguous_and_direct, __pyx_k_contiguous_and_direct, sizeof(__pyx_k_contiguous_and_direct), 0, 0, 1, 0},
   25127           1 :     {&__pyx_kp_s_contiguous_and_indirect, __pyx_k_contiguous_and_indirect, sizeof(__pyx_k_contiguous_and_indirect), 0, 0, 1, 0},
   25128           1 :     {&__pyx_n_s_count, __pyx_k_count, sizeof(__pyx_k_count), 0, 0, 1, 1},
   25129           1 :     {&__pyx_n_u_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 1, 0, 1},
   25130           1 :     {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
   25131           1 :     {&__pyx_kp_u_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0},
   25132           1 :     {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},
   25133           1 :     {&__pyx_n_s_dtype_is_object, __pyx_k_dtype_is_object, sizeof(__pyx_k_dtype_is_object), 0, 0, 1, 1},
   25134           1 :     {&__pyx_kp_u_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0},
   25135           1 :     {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
   25136           1 :     {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
   25137           1 :     {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
   25138           1 :     {&__pyx_n_u_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 1, 0, 1},
   25139           1 :     {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1},
   25140           1 :     {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
   25141           1 :     {&__pyx_n_s_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 0, 1, 1},
   25142           1 :     {&__pyx_n_u_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 1, 0, 1},
   25143           1 :     {&__pyx_kp_u_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0},
   25144           1 :     {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
   25145           1 :     {&__pyx_kp_u_got, __pyx_k_got, sizeof(__pyx_k_got), 0, 1, 0, 0},
   25146           1 :     {&__pyx_kp_u_got_differing_extents_in_dimensi, __pyx_k_got_differing_extents_in_dimensi, sizeof(__pyx_k_got_differing_extents_in_dimensi), 0, 1, 0, 0},
   25147           1 :     {&__pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_k_home_czgdp18079_Quansight_scipy, sizeof(__pyx_k_home_czgdp18079_Quansight_scipy), 0, 0, 1, 0},
   25148           1 :     {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
   25149           1 :     {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
   25150           1 :     {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
   25151           1 :     {&__pyx_n_s_initializing, __pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 0, 1, 1},
   25152           1 :     {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1},
   25153           1 :     {&__pyx_kp_u_isenabled, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0},
   25154           1 :     {&__pyx_n_s_itemsize, __pyx_k_itemsize, sizeof(__pyx_k_itemsize), 0, 0, 1, 1},
   25155           1 :     {&__pyx_kp_s_itemsize_0_for_cython_array, __pyx_k_itemsize_0_for_cython_array, sizeof(__pyx_k_itemsize_0_for_cython_array), 0, 0, 1, 0},
   25156           1 :     {&__pyx_n_s_lu_dispatcher, __pyx_k_lu_dispatcher, sizeof(__pyx_k_lu_dispatcher), 0, 0, 1, 1},
   25157           1 :     {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
   25158           1 :     {&__pyx_n_s_memview, __pyx_k_memview, sizeof(__pyx_k_memview), 0, 0, 1, 1},
   25159           1 :     {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
   25160           1 :     {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
   25161           1 :     {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
   25162           1 :     {&__pyx_n_s_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 0, 1, 1},
   25163           1 :     {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
   25164           1 :     {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
   25165           1 :     {&__pyx_kp_u_numpy__core_multiarray_failed_to, __pyx_k_numpy__core_multiarray_failed_to, sizeof(__pyx_k_numpy__core_multiarray_failed_to), 0, 1, 0, 0},
   25166           1 :     {&__pyx_kp_u_numpy__core_umath_failed_to_impo, __pyx_k_numpy__core_umath_failed_to_impo, sizeof(__pyx_k_numpy__core_umath_failed_to_impo), 0, 1, 0, 0},
   25167           1 :     {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
   25168           1 :     {&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 0, 0, 1, 1},
   25169           1 :     {&__pyx_n_s_permute_l, __pyx_k_permute_l, sizeof(__pyx_k_permute_l), 0, 0, 1, 1},
   25170           1 :     {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
   25171           1 :     {&__pyx_n_s_piv, __pyx_k_piv, sizeof(__pyx_k_piv), 0, 0, 1, 1},
   25172           1 :     {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
   25173           1 :     {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
   25174           1 :     {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
   25175           1 :     {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
   25176           1 :     {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
   25177           1 :     {&__pyx_n_s_pyx_unpickle_Enum, __pyx_k_pyx_unpickle_Enum, sizeof(__pyx_k_pyx_unpickle_Enum), 0, 0, 1, 1},
   25178           1 :     {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
   25179           1 :     {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
   25180           1 :     {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
   25181           1 :     {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
   25182           1 :     {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
   25183           1 :     {&__pyx_n_s_register, __pyx_k_register, sizeof(__pyx_k_register), 0, 0, 1, 1},
   25184           1 :     {&__pyx_n_s_scipy_linalg__decomp_lu_cython, __pyx_k_scipy_linalg__decomp_lu_cython, sizeof(__pyx_k_scipy_linalg__decomp_lu_cython), 0, 0, 1, 1},
   25185           1 :     {&__pyx_kp_u_scipy_linalg_lu_failed_to_alloca, __pyx_k_scipy_linalg_lu_failed_to_alloca, sizeof(__pyx_k_scipy_linalg_lu_failed_to_alloca), 0, 1, 0, 0},
   25186           1 :     {&__pyx_kp_u_scipy_linalg_lu_has_encountered, __pyx_k_scipy_linalg_lu_has_encountered, sizeof(__pyx_k_scipy_linalg_lu_has_encountered), 0, 1, 0, 0},
   25187           1 :     {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
   25188           1 :     {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
   25189           1 :     {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
   25190           1 :     {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
   25191           1 :     {&__pyx_n_s_spec, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1},
   25192           1 :     {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
   25193           1 :     {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1},
   25194           1 :     {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
   25195           1 :     {&__pyx_kp_s_strided_and_direct, __pyx_k_strided_and_direct, sizeof(__pyx_k_strided_and_direct), 0, 0, 1, 0},
   25196           1 :     {&__pyx_kp_s_strided_and_direct_or_indirect, __pyx_k_strided_and_direct_or_indirect, sizeof(__pyx_k_strided_and_direct_or_indirect), 0, 0, 1, 0},
   25197           1 :     {&__pyx_kp_s_strided_and_indirect, __pyx_k_strided_and_indirect, sizeof(__pyx_k_strided_and_indirect), 0, 0, 1, 0},
   25198           1 :     {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
   25199           1 :     {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1},
   25200           1 :     {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
   25201           1 :     {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
   25202           1 :     {&__pyx_kp_u_th_parameter, __pyx_k_th_parameter, sizeof(__pyx_k_th_parameter), 0, 1, 0, 0},
   25203           1 :     {&__pyx_n_s_u, __pyx_k_u, sizeof(__pyx_k_u), 0, 0, 1, 1},
   25204           1 :     {&__pyx_kp_s_unable_to_allocate_array_data, __pyx_k_unable_to_allocate_array_data, sizeof(__pyx_k_unable_to_allocate_array_data), 0, 0, 1, 0},
   25205           1 :     {&__pyx_kp_s_unable_to_allocate_shape_and_str, __pyx_k_unable_to_allocate_shape_and_str, sizeof(__pyx_k_unable_to_allocate_shape_and_str), 0, 0, 1, 0},
   25206           1 :     {&__pyx_n_s_unpack, __pyx_k_unpack, sizeof(__pyx_k_unpack), 0, 0, 1, 1},
   25207           1 :     {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
   25208           1 :     {&__pyx_n_s_version_info, __pyx_k_version_info, sizeof(__pyx_k_version_info), 0, 0, 1, 1},
   25209             :     {0, 0, 0, 0, 0, 0, 0}
   25210             :   };
   25211           1 :   return __Pyx_InitStrings(__pyx_string_tab);
   25212             : }
   25213             : /* #### Code section: cached_builtins ### */
   25214           1 : static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
   25215           1 :   __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(0, 57, __pyx_L1_error)
   25216           1 :   __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 84, __pyx_L1_error)
   25217           1 :   __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 96, __pyx_L1_error)
   25218           1 :   __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 170, __pyx_L1_error)
   25219           1 :   __pyx_builtin___import__ = __Pyx_GetBuiltinName(__pyx_n_s_import); if (!__pyx_builtin___import__) __PYX_ERR(1, 100, __pyx_L1_error)
   25220           1 :   __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(1, 159, __pyx_L1_error)
   25221           1 :   __pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_n_s_AssertionError); if (!__pyx_builtin_AssertionError) __PYX_ERR(1, 373, __pyx_L1_error)
   25222           1 :   __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(1, 408, __pyx_L1_error)
   25223           1 :   __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(1, 618, __pyx_L1_error)
   25224           1 :   __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(1, 914, __pyx_L1_error)
   25225           1 :   __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 1025, __pyx_L1_error)
   25226             :   return 0;
   25227             :   __pyx_L1_error:;
   25228             :   return -1;
   25229             : }
   25230             : /* #### Code section: cached_constants ### */
   25231             : 
   25232           1 : static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
   25233             :   __Pyx_RefNannyDeclarations
   25234           1 :   __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
   25235             : 
   25236             :   /* "View.MemoryView":582
   25237             :  *     def suboffsets(self):
   25238             :  *         if self.view.suboffsets == NULL:
   25239             :  *             return (-1,) * self.view.ndim             # <<<<<<<<<<<<<<
   25240             :  * 
   25241             :  *         return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
   25242             :  */
   25243           1 :   __pyx_tuple__4 = PyTuple_New(1); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(1, 582, __pyx_L1_error)
   25244           1 :   __Pyx_GOTREF(__pyx_tuple__4);
   25245           1 :   __Pyx_INCREF(__pyx_int_neg_1);
   25246           1 :   __Pyx_GIVEREF(__pyx_int_neg_1);
   25247           1 :   if (__Pyx_PyTuple_SET_ITEM(__pyx_tuple__4, 0, __pyx_int_neg_1)) __PYX_ERR(1, 582, __pyx_L1_error);
   25248           1 :   __Pyx_GIVEREF(__pyx_tuple__4);
   25249             : 
   25250             :   /* "View.MemoryView":679
   25251             :  *     tup = <tuple>index if isinstance(index, tuple) else (index,)
   25252             :  * 
   25253             :  *     result = [slice(None)] * ndim             # <<<<<<<<<<<<<<
   25254             :  *     have_slices = False
   25255             :  *     seen_ellipsis = False
   25256             :  */
   25257           1 :   __pyx_slice__5 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__5)) __PYX_ERR(1, 679, __pyx_L1_error)
   25258           1 :   __Pyx_GOTREF(__pyx_slice__5);
   25259           1 :   __Pyx_GIVEREF(__pyx_slice__5);
   25260             : 
   25261             :   /* "(tree fragment)":4
   25262             :  *     cdef object __pyx_PickleError
   25263             :  *     cdef object __pyx_result
   25264             :  *     if __pyx_checksum not in (0x82a3537, 0x6ae9995, 0xb068931):             # <<<<<<<<<<<<<<
   25265             :  *         from pickle import PickleError as __pyx_PickleError
   25266             :  *         raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x82a3537, 0x6ae9995, 0xb068931) = (name))" % __pyx_checksum
   25267             :  */
   25268           1 :   __pyx_tuple__8 = PyTuple_Pack(3, __pyx_int_136983863, __pyx_int_112105877, __pyx_int_184977713); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(1, 4, __pyx_L1_error)
   25269           1 :   __Pyx_GOTREF(__pyx_tuple__8);
   25270           1 :   __Pyx_GIVEREF(__pyx_tuple__8);
   25271             : 
   25272             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1025
   25273             :  *         __pyx_import_array()
   25274             :  *     except Exception:
   25275             :  *         raise ImportError("numpy._core.multiarray failed to import")             # <<<<<<<<<<<<<<
   25276             :  * 
   25277             :  * cdef inline int import_umath() except -1:
   25278             :  */
   25279           1 :   __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_u_numpy__core_multiarray_failed_to); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 1025, __pyx_L1_error)
   25280           1 :   __Pyx_GOTREF(__pyx_tuple__9);
   25281           1 :   __Pyx_GIVEREF(__pyx_tuple__9);
   25282             : 
   25283             :   /* "../../../miniforge3/envs/scipy-dev/lib/python3.12/site-packages/numpy/__init__.cython-30.pxd":1031
   25284             :  *         _import_umath()
   25285             :  *     except Exception:
   25286             :  *         raise ImportError("numpy._core.umath failed to import")             # <<<<<<<<<<<<<<
   25287             :  * 
   25288             :  * cdef inline int import_ufunc() except -1:
   25289             :  */
   25290           1 :   __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_numpy__core_umath_failed_to_impo); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(2, 1031, __pyx_L1_error)
   25291           1 :   __Pyx_GOTREF(__pyx_tuple__10);
   25292           1 :   __Pyx_GIVEREF(__pyx_tuple__10);
   25293             : 
   25294             :   /* "scipy/linalg/_decomp_lu_cython.pyx":57
   25295             :  *     cdef int *ipiv = <int*>PyMem_Malloc(m * sizeof(int))
   25296             :  *     if not ipiv:
   25297             :  *         raise MemoryError('scipy.linalg.lu failed to allocate '             # <<<<<<<<<<<<<<
   25298             :  *                           'required memory.')
   25299             :  *     dims[0] = m
   25300             :  */
   25301           1 :   __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_u_scipy_linalg_lu_failed_to_alloca); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 57, __pyx_L1_error)
   25302           1 :   __Pyx_GOTREF(__pyx_tuple__11);
   25303           1 :   __Pyx_GIVEREF(__pyx_tuple__11);
   25304             : 
   25305             :   /* "scipy/linalg/_decomp_lu_cython.pyx":140
   25306             :  * 
   25307             :  *         if m > n:
   25308             :  *             b[:, :] = a[:, :]             # <<<<<<<<<<<<<<
   25309             :  *             # memcpy(bb, &a[0, 0], m*mn*sizeof(lapack_t))
   25310             :  *             for ind1 in range(m):
   25311             :  */
   25312           1 :   __pyx_slice__12 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__12)) __PYX_ERR(0, 140, __pyx_L1_error)
   25313           1 :   __Pyx_GOTREF(__pyx_slice__12);
   25314           1 :   __Pyx_GIVEREF(__pyx_slice__12);
   25315           1 :   __pyx_slice__13 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__13)) __PYX_ERR(0, 140, __pyx_L1_error)
   25316           1 :   __Pyx_GOTREF(__pyx_slice__13);
   25317           1 :   __Pyx_GIVEREF(__pyx_slice__13);
   25318           1 :   __pyx_tuple__14 = PyTuple_Pack(2, __pyx_slice__12, __pyx_slice__13); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 140, __pyx_L1_error)
   25319           1 :   __Pyx_GOTREF(__pyx_tuple__14);
   25320           1 :   __Pyx_GIVEREF(__pyx_tuple__14);
   25321           1 :   __pyx_slice__15 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__15)) __PYX_ERR(0, 140, __pyx_L1_error)
   25322           1 :   __Pyx_GOTREF(__pyx_slice__15);
   25323           1 :   __Pyx_GIVEREF(__pyx_slice__15);
   25324           1 :   __pyx_slice__16 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__16)) __PYX_ERR(0, 140, __pyx_L1_error)
   25325           1 :   __Pyx_GOTREF(__pyx_slice__16);
   25326           1 :   __Pyx_GIVEREF(__pyx_slice__16);
   25327           1 :   __pyx_tuple__17 = PyTuple_Pack(2, __pyx_slice__15, __pyx_slice__16); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 140, __pyx_L1_error)
   25328           1 :   __Pyx_GOTREF(__pyx_tuple__17);
   25329           1 :   __Pyx_GIVEREF(__pyx_tuple__17);
   25330             : 
   25331             :   /* "scipy/linalg/_decomp_lu_cython.pyx":146
   25332             :  *                     continue
   25333             :  *                 else:
   25334             :  *                     a[ind1, :] = b[perm[ind1], :]             # <<<<<<<<<<<<<<
   25335             :  * 
   25336             :  *         else:  # same but for lu array
   25337             :  */
   25338           1 :   __pyx_slice__18 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__18)) __PYX_ERR(0, 146, __pyx_L1_error)
   25339           1 :   __Pyx_GOTREF(__pyx_slice__18);
   25340           1 :   __Pyx_GIVEREF(__pyx_slice__18);
   25341           1 :   __pyx_slice__19 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__19)) __PYX_ERR(0, 146, __pyx_L1_error)
   25342           1 :   __Pyx_GOTREF(__pyx_slice__19);
   25343           1 :   __Pyx_GIVEREF(__pyx_slice__19);
   25344             : 
   25345             :   /* "scipy/linalg/_decomp_lu_cython.pyx":149
   25346             :  * 
   25347             :  *         else:  # same but for lu array
   25348             :  *             b[:mn, :mn] = lu[:, :]             # <<<<<<<<<<<<<<
   25349             :  *             # memcpy(bb, &lu[0, 0], mn*n*sizeof(lapack_t))
   25350             :  *             for ind1 in range(mn):
   25351             :  */
   25352           1 :   __pyx_slice__20 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__20)) __PYX_ERR(0, 149, __pyx_L1_error)
   25353           1 :   __Pyx_GOTREF(__pyx_slice__20);
   25354           1 :   __Pyx_GIVEREF(__pyx_slice__20);
   25355           1 :   __pyx_slice__21 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__21)) __PYX_ERR(0, 149, __pyx_L1_error)
   25356           1 :   __Pyx_GOTREF(__pyx_slice__21);
   25357           1 :   __Pyx_GIVEREF(__pyx_slice__21);
   25358           1 :   __pyx_tuple__22 = PyTuple_Pack(2, __pyx_slice__20, __pyx_slice__21); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 149, __pyx_L1_error)
   25359           1 :   __Pyx_GOTREF(__pyx_tuple__22);
   25360           1 :   __Pyx_GIVEREF(__pyx_tuple__22);
   25361             : 
   25362             :   /* "scipy/linalg/_decomp_lu_cython.pyx":155
   25363             :  *                     continue
   25364             :  *                 else:
   25365             :  *                     lu[ind1, :] = b[perm[ind1], :mn]             # <<<<<<<<<<<<<<
   25366             :  * 
   25367             :  * 
   25368             :  */
   25369           1 :   __pyx_slice__23 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__23)) __PYX_ERR(0, 155, __pyx_L1_error)
   25370           1 :   __Pyx_GOTREF(__pyx_slice__23);
   25371           1 :   __Pyx_GIVEREF(__pyx_slice__23);
   25372             : 
   25373             :   /* "scipy/linalg/_decomp_lu_cython.pyx":140
   25374             :  * 
   25375             :  *         if m > n:
   25376             :  *             b[:, :] = a[:, :]             # <<<<<<<<<<<<<<
   25377             :  *             # memcpy(bb, &a[0, 0], m*mn*sizeof(lapack_t))
   25378             :  *             for ind1 in range(m):
   25379             :  */
   25380           1 :   __pyx_slice__24 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__24)) __PYX_ERR(0, 140, __pyx_L1_error)
   25381           1 :   __Pyx_GOTREF(__pyx_slice__24);
   25382           1 :   __Pyx_GIVEREF(__pyx_slice__24);
   25383           1 :   __pyx_slice__25 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__25)) __PYX_ERR(0, 140, __pyx_L1_error)
   25384           1 :   __Pyx_GOTREF(__pyx_slice__25);
   25385           1 :   __Pyx_GIVEREF(__pyx_slice__25);
   25386           1 :   __pyx_tuple__26 = PyTuple_Pack(2, __pyx_slice__24, __pyx_slice__25); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 140, __pyx_L1_error)
   25387           1 :   __Pyx_GOTREF(__pyx_tuple__26);
   25388           1 :   __Pyx_GIVEREF(__pyx_tuple__26);
   25389           1 :   __pyx_slice__27 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__27)) __PYX_ERR(0, 140, __pyx_L1_error)
   25390           1 :   __Pyx_GOTREF(__pyx_slice__27);
   25391           1 :   __Pyx_GIVEREF(__pyx_slice__27);
   25392           1 :   __pyx_slice__28 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__28)) __PYX_ERR(0, 140, __pyx_L1_error)
   25393           1 :   __Pyx_GOTREF(__pyx_slice__28);
   25394           1 :   __Pyx_GIVEREF(__pyx_slice__28);
   25395           1 :   __pyx_tuple__29 = PyTuple_Pack(2, __pyx_slice__27, __pyx_slice__28); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 140, __pyx_L1_error)
   25396           1 :   __Pyx_GOTREF(__pyx_tuple__29);
   25397           1 :   __Pyx_GIVEREF(__pyx_tuple__29);
   25398             : 
   25399             :   /* "scipy/linalg/_decomp_lu_cython.pyx":146
   25400             :  *                     continue
   25401             :  *                 else:
   25402             :  *                     a[ind1, :] = b[perm[ind1], :]             # <<<<<<<<<<<<<<
   25403             :  * 
   25404             :  *         else:  # same but for lu array
   25405             :  */
   25406           1 :   __pyx_slice__30 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__30)) __PYX_ERR(0, 146, __pyx_L1_error)
   25407           1 :   __Pyx_GOTREF(__pyx_slice__30);
   25408           1 :   __Pyx_GIVEREF(__pyx_slice__30);
   25409           1 :   __pyx_slice__31 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__31)) __PYX_ERR(0, 146, __pyx_L1_error)
   25410           1 :   __Pyx_GOTREF(__pyx_slice__31);
   25411           1 :   __Pyx_GIVEREF(__pyx_slice__31);
   25412             : 
   25413             :   /* "scipy/linalg/_decomp_lu_cython.pyx":149
   25414             :  * 
   25415             :  *         else:  # same but for lu array
   25416             :  *             b[:mn, :mn] = lu[:, :]             # <<<<<<<<<<<<<<
   25417             :  *             # memcpy(bb, &lu[0, 0], mn*n*sizeof(lapack_t))
   25418             :  *             for ind1 in range(mn):
   25419             :  */
   25420           1 :   __pyx_slice__32 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__32)) __PYX_ERR(0, 149, __pyx_L1_error)
   25421           1 :   __Pyx_GOTREF(__pyx_slice__32);
   25422           1 :   __Pyx_GIVEREF(__pyx_slice__32);
   25423           1 :   __pyx_slice__33 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__33)) __PYX_ERR(0, 149, __pyx_L1_error)
   25424           1 :   __Pyx_GOTREF(__pyx_slice__33);
   25425           1 :   __Pyx_GIVEREF(__pyx_slice__33);
   25426           1 :   __pyx_tuple__34 = PyTuple_Pack(2, __pyx_slice__32, __pyx_slice__33); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 149, __pyx_L1_error)
   25427           1 :   __Pyx_GOTREF(__pyx_tuple__34);
   25428           1 :   __Pyx_GIVEREF(__pyx_tuple__34);
   25429             : 
   25430             :   /* "scipy/linalg/_decomp_lu_cython.pyx":155
   25431             :  *                     continue
   25432             :  *                 else:
   25433             :  *                     lu[ind1, :] = b[perm[ind1], :mn]             # <<<<<<<<<<<<<<
   25434             :  * 
   25435             :  * 
   25436             :  */
   25437           1 :   __pyx_slice__35 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__35)) __PYX_ERR(0, 155, __pyx_L1_error)
   25438           1 :   __Pyx_GOTREF(__pyx_slice__35);
   25439           1 :   __Pyx_GIVEREF(__pyx_slice__35);
   25440             : 
   25441             :   /* "scipy/linalg/_decomp_lu_cython.pyx":140
   25442             :  * 
   25443             :  *         if m > n:
   25444             :  *             b[:, :] = a[:, :]             # <<<<<<<<<<<<<<
   25445             :  *             # memcpy(bb, &a[0, 0], m*mn*sizeof(lapack_t))
   25446             :  *             for ind1 in range(m):
   25447             :  */
   25448           1 :   __pyx_slice__36 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__36)) __PYX_ERR(0, 140, __pyx_L1_error)
   25449           1 :   __Pyx_GOTREF(__pyx_slice__36);
   25450           1 :   __Pyx_GIVEREF(__pyx_slice__36);
   25451           1 :   __pyx_slice__37 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__37)) __PYX_ERR(0, 140, __pyx_L1_error)
   25452           1 :   __Pyx_GOTREF(__pyx_slice__37);
   25453           1 :   __Pyx_GIVEREF(__pyx_slice__37);
   25454           1 :   __pyx_tuple__38 = PyTuple_Pack(2, __pyx_slice__36, __pyx_slice__37); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 140, __pyx_L1_error)
   25455           1 :   __Pyx_GOTREF(__pyx_tuple__38);
   25456           1 :   __Pyx_GIVEREF(__pyx_tuple__38);
   25457           1 :   __pyx_slice__39 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__39)) __PYX_ERR(0, 140, __pyx_L1_error)
   25458           1 :   __Pyx_GOTREF(__pyx_slice__39);
   25459           1 :   __Pyx_GIVEREF(__pyx_slice__39);
   25460           1 :   __pyx_slice__40 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__40)) __PYX_ERR(0, 140, __pyx_L1_error)
   25461           1 :   __Pyx_GOTREF(__pyx_slice__40);
   25462           1 :   __Pyx_GIVEREF(__pyx_slice__40);
   25463           1 :   __pyx_tuple__41 = PyTuple_Pack(2, __pyx_slice__39, __pyx_slice__40); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 140, __pyx_L1_error)
   25464           1 :   __Pyx_GOTREF(__pyx_tuple__41);
   25465           1 :   __Pyx_GIVEREF(__pyx_tuple__41);
   25466             : 
   25467             :   /* "scipy/linalg/_decomp_lu_cython.pyx":146
   25468             :  *                     continue
   25469             :  *                 else:
   25470             :  *                     a[ind1, :] = b[perm[ind1], :]             # <<<<<<<<<<<<<<
   25471             :  * 
   25472             :  *         else:  # same but for lu array
   25473             :  */
   25474           1 :   __pyx_slice__42 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__42)) __PYX_ERR(0, 146, __pyx_L1_error)
   25475           1 :   __Pyx_GOTREF(__pyx_slice__42);
   25476           1 :   __Pyx_GIVEREF(__pyx_slice__42);
   25477           1 :   __pyx_slice__43 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__43)) __PYX_ERR(0, 146, __pyx_L1_error)
   25478           1 :   __Pyx_GOTREF(__pyx_slice__43);
   25479           1 :   __Pyx_GIVEREF(__pyx_slice__43);
   25480             : 
   25481             :   /* "scipy/linalg/_decomp_lu_cython.pyx":149
   25482             :  * 
   25483             :  *         else:  # same but for lu array
   25484             :  *             b[:mn, :mn] = lu[:, :]             # <<<<<<<<<<<<<<
   25485             :  *             # memcpy(bb, &lu[0, 0], mn*n*sizeof(lapack_t))
   25486             :  *             for ind1 in range(mn):
   25487             :  */
   25488           1 :   __pyx_slice__44 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__44)) __PYX_ERR(0, 149, __pyx_L1_error)
   25489           1 :   __Pyx_GOTREF(__pyx_slice__44);
   25490           1 :   __Pyx_GIVEREF(__pyx_slice__44);
   25491           1 :   __pyx_slice__45 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__45)) __PYX_ERR(0, 149, __pyx_L1_error)
   25492           1 :   __Pyx_GOTREF(__pyx_slice__45);
   25493           1 :   __Pyx_GIVEREF(__pyx_slice__45);
   25494           1 :   __pyx_tuple__46 = PyTuple_Pack(2, __pyx_slice__44, __pyx_slice__45); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 149, __pyx_L1_error)
   25495           1 :   __Pyx_GOTREF(__pyx_tuple__46);
   25496           1 :   __Pyx_GIVEREF(__pyx_tuple__46);
   25497             : 
   25498             :   /* "scipy/linalg/_decomp_lu_cython.pyx":155
   25499             :  *                     continue
   25500             :  *                 else:
   25501             :  *                     lu[ind1, :] = b[perm[ind1], :mn]             # <<<<<<<<<<<<<<
   25502             :  * 
   25503             :  * 
   25504             :  */
   25505           1 :   __pyx_slice__47 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__47)) __PYX_ERR(0, 155, __pyx_L1_error)
   25506           1 :   __Pyx_GOTREF(__pyx_slice__47);
   25507           1 :   __Pyx_GIVEREF(__pyx_slice__47);
   25508             : 
   25509             :   /* "scipy/linalg/_decomp_lu_cython.pyx":140
   25510             :  * 
   25511             :  *         if m > n:
   25512             :  *             b[:, :] = a[:, :]             # <<<<<<<<<<<<<<
   25513             :  *             # memcpy(bb, &a[0, 0], m*mn*sizeof(lapack_t))
   25514             :  *             for ind1 in range(m):
   25515             :  */
   25516           1 :   __pyx_slice__48 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__48)) __PYX_ERR(0, 140, __pyx_L1_error)
   25517           1 :   __Pyx_GOTREF(__pyx_slice__48);
   25518           1 :   __Pyx_GIVEREF(__pyx_slice__48);
   25519           1 :   __pyx_slice__49 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__49)) __PYX_ERR(0, 140, __pyx_L1_error)
   25520           1 :   __Pyx_GOTREF(__pyx_slice__49);
   25521           1 :   __Pyx_GIVEREF(__pyx_slice__49);
   25522           1 :   __pyx_tuple__50 = PyTuple_Pack(2, __pyx_slice__48, __pyx_slice__49); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 140, __pyx_L1_error)
   25523           1 :   __Pyx_GOTREF(__pyx_tuple__50);
   25524           1 :   __Pyx_GIVEREF(__pyx_tuple__50);
   25525           1 :   __pyx_slice__51 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__51)) __PYX_ERR(0, 140, __pyx_L1_error)
   25526           1 :   __Pyx_GOTREF(__pyx_slice__51);
   25527           1 :   __Pyx_GIVEREF(__pyx_slice__51);
   25528           1 :   __pyx_slice__52 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__52)) __PYX_ERR(0, 140, __pyx_L1_error)
   25529           1 :   __Pyx_GOTREF(__pyx_slice__52);
   25530           1 :   __Pyx_GIVEREF(__pyx_slice__52);
   25531           1 :   __pyx_tuple__53 = PyTuple_Pack(2, __pyx_slice__51, __pyx_slice__52); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 140, __pyx_L1_error)
   25532           1 :   __Pyx_GOTREF(__pyx_tuple__53);
   25533           1 :   __Pyx_GIVEREF(__pyx_tuple__53);
   25534             : 
   25535             :   /* "scipy/linalg/_decomp_lu_cython.pyx":146
   25536             :  *                     continue
   25537             :  *                 else:
   25538             :  *                     a[ind1, :] = b[perm[ind1], :]             # <<<<<<<<<<<<<<
   25539             :  * 
   25540             :  *         else:  # same but for lu array
   25541             :  */
   25542           1 :   __pyx_slice__54 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__54)) __PYX_ERR(0, 146, __pyx_L1_error)
   25543           1 :   __Pyx_GOTREF(__pyx_slice__54);
   25544           1 :   __Pyx_GIVEREF(__pyx_slice__54);
   25545           1 :   __pyx_slice__55 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__55)) __PYX_ERR(0, 146, __pyx_L1_error)
   25546           1 :   __Pyx_GOTREF(__pyx_slice__55);
   25547           1 :   __Pyx_GIVEREF(__pyx_slice__55);
   25548             : 
   25549             :   /* "scipy/linalg/_decomp_lu_cython.pyx":149
   25550             :  * 
   25551             :  *         else:  # same but for lu array
   25552             :  *             b[:mn, :mn] = lu[:, :]             # <<<<<<<<<<<<<<
   25553             :  *             # memcpy(bb, &lu[0, 0], mn*n*sizeof(lapack_t))
   25554             :  *             for ind1 in range(mn):
   25555             :  */
   25556           1 :   __pyx_slice__56 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__56)) __PYX_ERR(0, 149, __pyx_L1_error)
   25557           1 :   __Pyx_GOTREF(__pyx_slice__56);
   25558           1 :   __Pyx_GIVEREF(__pyx_slice__56);
   25559           1 :   __pyx_slice__57 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__57)) __PYX_ERR(0, 149, __pyx_L1_error)
   25560           1 :   __Pyx_GOTREF(__pyx_slice__57);
   25561           1 :   __Pyx_GIVEREF(__pyx_slice__57);
   25562           1 :   __pyx_tuple__58 = PyTuple_Pack(2, __pyx_slice__56, __pyx_slice__57); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 149, __pyx_L1_error)
   25563           1 :   __Pyx_GOTREF(__pyx_tuple__58);
   25564           1 :   __Pyx_GIVEREF(__pyx_tuple__58);
   25565             : 
   25566             :   /* "scipy/linalg/_decomp_lu_cython.pyx":155
   25567             :  *                     continue
   25568             :  *                 else:
   25569             :  *                     lu[ind1, :] = b[perm[ind1], :mn]             # <<<<<<<<<<<<<<
   25570             :  * 
   25571             :  * 
   25572             :  */
   25573           1 :   __pyx_slice__59 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__59)) __PYX_ERR(0, 155, __pyx_L1_error)
   25574           1 :   __Pyx_GOTREF(__pyx_slice__59);
   25575           1 :   __Pyx_GIVEREF(__pyx_slice__59);
   25576             : 
   25577             :   /* "scipy/linalg/_decomp_lu_cython.pyx":170
   25578             :  *         lu_decompose[cnp.complex128_t](a, u, piv, permute_l)
   25579             :  *     else:
   25580             :  *         raise TypeError("Unsupported type given to lu_dispatcher")             # <<<<<<<<<<<<<<
   25581             :  */
   25582           1 :   __pyx_tuple__60 = PyTuple_Pack(1, __pyx_kp_u_Unsupported_type_given_to_lu_dis); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 170, __pyx_L1_error)
   25583           1 :   __Pyx_GOTREF(__pyx_tuple__60);
   25584           1 :   __Pyx_GIVEREF(__pyx_tuple__60);
   25585             : 
   25586             :   /* "View.MemoryView":100
   25587             :  * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
   25588             :  * try:
   25589             :  *     if __import__("sys").version_info >= (3, 3):             # <<<<<<<<<<<<<<
   25590             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
   25591             :  *     else:
   25592             :  */
   25593           1 :   __pyx_tuple__61 = PyTuple_Pack(1, __pyx_n_s_sys); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(1, 100, __pyx_L1_error)
   25594           1 :   __Pyx_GOTREF(__pyx_tuple__61);
   25595           1 :   __Pyx_GIVEREF(__pyx_tuple__61);
   25596           1 :   __pyx_tuple__62 = PyTuple_Pack(2, __pyx_int_3, __pyx_int_3); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(1, 100, __pyx_L1_error)
   25597           1 :   __Pyx_GOTREF(__pyx_tuple__62);
   25598           1 :   __Pyx_GIVEREF(__pyx_tuple__62);
   25599             : 
   25600             :   /* "View.MemoryView":101
   25601             :  * try:
   25602             :  *     if __import__("sys").version_info >= (3, 3):
   25603             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence             # <<<<<<<<<<<<<<
   25604             :  *     else:
   25605             :  *         __pyx_collections_abc_Sequence = __import__("collections").Sequence
   25606             :  */
   25607           1 :   __pyx_tuple__63 = PyTuple_Pack(1, __pyx_kp_s_collections_abc); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(1, 101, __pyx_L1_error)
   25608           1 :   __Pyx_GOTREF(__pyx_tuple__63);
   25609           1 :   __Pyx_GIVEREF(__pyx_tuple__63);
   25610             : 
   25611             :   /* "View.MemoryView":103
   25612             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
   25613             :  *     else:
   25614             :  *         __pyx_collections_abc_Sequence = __import__("collections").Sequence             # <<<<<<<<<<<<<<
   25615             :  * except:
   25616             :  * 
   25617             :  */
   25618           1 :   __pyx_tuple__64 = PyTuple_Pack(1, __pyx_n_s_collections); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(1, 103, __pyx_L1_error)
   25619           1 :   __Pyx_GOTREF(__pyx_tuple__64);
   25620           1 :   __Pyx_GIVEREF(__pyx_tuple__64);
   25621             : 
   25622             :   /* "View.MemoryView":309
   25623             :  *         return self.name
   25624             :  * 
   25625             :  * cdef generic = Enum("<strided and direct or indirect>")             # <<<<<<<<<<<<<<
   25626             :  * cdef strided = Enum("<strided and direct>") # default
   25627             :  * cdef indirect = Enum("<strided and indirect>")
   25628             :  */
   25629           1 :   __pyx_tuple__65 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct_or_indirect); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(1, 309, __pyx_L1_error)
   25630           1 :   __Pyx_GOTREF(__pyx_tuple__65);
   25631           1 :   __Pyx_GIVEREF(__pyx_tuple__65);
   25632             : 
   25633             :   /* "View.MemoryView":310
   25634             :  * 
   25635             :  * cdef generic = Enum("<strided and direct or indirect>")
   25636             :  * cdef strided = Enum("<strided and direct>") # default             # <<<<<<<<<<<<<<
   25637             :  * cdef indirect = Enum("<strided and indirect>")
   25638             :  * 
   25639             :  */
   25640           1 :   __pyx_tuple__66 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(1, 310, __pyx_L1_error)
   25641           1 :   __Pyx_GOTREF(__pyx_tuple__66);
   25642           1 :   __Pyx_GIVEREF(__pyx_tuple__66);
   25643             : 
   25644             :   /* "View.MemoryView":311
   25645             :  * cdef generic = Enum("<strided and direct or indirect>")
   25646             :  * cdef strided = Enum("<strided and direct>") # default
   25647             :  * cdef indirect = Enum("<strided and indirect>")             # <<<<<<<<<<<<<<
   25648             :  * 
   25649             :  * 
   25650             :  */
   25651           1 :   __pyx_tuple__67 = PyTuple_Pack(1, __pyx_kp_s_strided_and_indirect); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(1, 311, __pyx_L1_error)
   25652           1 :   __Pyx_GOTREF(__pyx_tuple__67);
   25653           1 :   __Pyx_GIVEREF(__pyx_tuple__67);
   25654             : 
   25655             :   /* "View.MemoryView":314
   25656             :  * 
   25657             :  * 
   25658             :  * cdef contiguous = Enum("<contiguous and direct>")             # <<<<<<<<<<<<<<
   25659             :  * cdef indirect_contiguous = Enum("<contiguous and indirect>")
   25660             :  * 
   25661             :  */
   25662           1 :   __pyx_tuple__68 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_direct); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(1, 314, __pyx_L1_error)
   25663           1 :   __Pyx_GOTREF(__pyx_tuple__68);
   25664           1 :   __Pyx_GIVEREF(__pyx_tuple__68);
   25665             : 
   25666             :   /* "View.MemoryView":315
   25667             :  * 
   25668             :  * cdef contiguous = Enum("<contiguous and direct>")
   25669             :  * cdef indirect_contiguous = Enum("<contiguous and indirect>")             # <<<<<<<<<<<<<<
   25670             :  * 
   25671             :  * 
   25672             :  */
   25673           1 :   __pyx_tuple__69 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_indirect); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(1, 315, __pyx_L1_error)
   25674           1 :   __Pyx_GOTREF(__pyx_tuple__69);
   25675           1 :   __Pyx_GIVEREF(__pyx_tuple__69);
   25676             : 
   25677             :   /* "(tree fragment)":1
   25678             :  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
   25679             :  *     cdef object __pyx_PickleError
   25680             :  *     cdef object __pyx_result
   25681             :  */
   25682           1 :   __pyx_tuple__70 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(1, 1, __pyx_L1_error)
   25683           1 :   __Pyx_GOTREF(__pyx_tuple__70);
   25684           1 :   __Pyx_GIVEREF(__pyx_tuple__70);
   25685           1 :   __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__70, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(1, 1, __pyx_L1_error)
   25686             : 
   25687             :   /* "scipy/linalg/_decomp_lu_cython.pyx":158
   25688             :  * 
   25689             :  * 
   25690             :  * @cython.nonecheck(False)             # <<<<<<<<<<<<<<
   25691             :  * @cython.initializedcheck(False)
   25692             :  * def lu_dispatcher(a, u, piv, permute_l):
   25693             :  */
   25694           1 :   __pyx_tuple__72 = PyTuple_Pack(4, __pyx_n_s_a, __pyx_n_s_u, __pyx_n_s_piv, __pyx_n_s_permute_l); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 158, __pyx_L1_error)
   25695           1 :   __Pyx_GOTREF(__pyx_tuple__72);
   25696           1 :   __Pyx_GIVEREF(__pyx_tuple__72);
   25697           1 :   __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__72, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_czgdp18079_Quansight_scipy, __pyx_n_s_lu_dispatcher, 158, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(0, 158, __pyx_L1_error)
   25698             :   __Pyx_RefNannyFinishContext();
   25699             :   return 0;
   25700             :   __pyx_L1_error:;
   25701             :   __Pyx_RefNannyFinishContext();
   25702             :   return -1;
   25703             : }
   25704             : /* #### Code section: init_constants ### */
   25705             : 
   25706           1 : static CYTHON_SMALL_CODE int __Pyx_InitConstants(void) {
   25707           1 :   if (__Pyx_CreateStringTabAndInitStrings() < 0) __PYX_ERR(0, 1, __pyx_L1_error);
   25708           1 :   __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
   25709           1 :   __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
   25710           1 :   __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
   25711           1 :   __pyx_int_112105877 = PyInt_FromLong(112105877L); if (unlikely(!__pyx_int_112105877)) __PYX_ERR(0, 1, __pyx_L1_error)
   25712           1 :   __pyx_int_136983863 = PyInt_FromLong(136983863L); if (unlikely(!__pyx_int_136983863)) __PYX_ERR(0, 1, __pyx_L1_error)
   25713           1 :   __pyx_int_184977713 = PyInt_FromLong(184977713L); if (unlikely(!__pyx_int_184977713)) __PYX_ERR(0, 1, __pyx_L1_error)
   25714           1 :   __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
   25715             :   return 0;
   25716             :   __pyx_L1_error:;
   25717             :   return -1;
   25718             : }
   25719             : /* #### Code section: init_globals ### */
   25720             : 
   25721           1 : static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
   25722             :   /* AssertionsEnabled.init */
   25723           1 :   if (likely(__Pyx_init_assertions_enabled() == 0)); else
   25724             : 
   25725           0 : if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
   25726             : 
   25727             :   return 0;
   25728           0 :   __pyx_L1_error:;
   25729           0 :   return -1;
   25730             : }
   25731             : /* #### Code section: init_module ### */
   25732             : 
   25733             : static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
   25734             : static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
   25735             : static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
   25736             : static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
   25737             : static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
   25738             : static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
   25739             : static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
   25740             : 
   25741           1 : static int __Pyx_modinit_global_init_code(void) {
   25742             :   __Pyx_RefNannyDeclarations
   25743           1 :   __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
   25744             :   /*--- Global init code ---*/
   25745           1 :   __pyx_collections_abc_Sequence = Py_None; Py_INCREF(Py_None);
   25746           1 :   generic = Py_None; Py_INCREF(Py_None);
   25747           1 :   strided = Py_None; Py_INCREF(Py_None);
   25748           1 :   indirect = Py_None; Py_INCREF(Py_None);
   25749           1 :   contiguous = Py_None; Py_INCREF(Py_None);
   25750           1 :   indirect_contiguous = Py_None; Py_INCREF(Py_None);
   25751           1 :   __Pyx_RefNannyFinishContext();
   25752           1 :   return 0;
   25753             : }
   25754             : 
   25755             : static int __Pyx_modinit_variable_export_code(void) {
   25756             :   __Pyx_RefNannyDeclarations
   25757             :   __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
   25758             :   /*--- Variable export code ---*/
   25759             :   __Pyx_RefNannyFinishContext();
   25760             :   return 0;
   25761             : }
   25762             : 
   25763             : static int __Pyx_modinit_function_export_code(void) {
   25764             :   __Pyx_RefNannyDeclarations
   25765             :   __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
   25766             :   /*--- Function export code ---*/
   25767             :   __Pyx_RefNannyFinishContext();
   25768             :   return 0;
   25769             : }
   25770             : 
   25771           1 : static int __Pyx_modinit_type_init_code(void) {
   25772             :   __Pyx_RefNannyDeclarations
   25773           1 :   PyObject *__pyx_t_1 = NULL;
   25774           1 :   int __pyx_lineno = 0;
   25775           1 :   const char *__pyx_filename = NULL;
   25776           1 :   int __pyx_clineno = 0;
   25777           1 :   __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
   25778             :   /*--- Type init code ---*/
   25779           1 :   __pyx_vtabptr_array = &__pyx_vtable_array;
   25780           1 :   __pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
   25781             :   #if CYTHON_USE_TYPE_SPECS
   25782             :   __pyx_array_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_array_spec, NULL); if (unlikely(!__pyx_array_type)) __PYX_ERR(1, 114, __pyx_L1_error)
   25783             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   25784             :   __pyx_array_type->tp_as_buffer = &__pyx_tp_as_buffer_array;
   25785             :   if (!__pyx_array_type->tp_as_buffer->bf_releasebuffer && __pyx_array_type->tp_base->tp_as_buffer && __pyx_array_type->tp_base->tp_as_buffer->bf_releasebuffer) {
   25786             :     __pyx_array_type->tp_as_buffer->bf_releasebuffer = __pyx_array_type->tp_base->tp_as_buffer->bf_releasebuffer;
   25787             :   }
   25788             :   #elif defined(Py_bf_getbuffer) && defined(Py_bf_releasebuffer)
   25789             :   /* PY_VERSION_HEX >= 0x03090000 || Py_LIMITED_API >= 0x030B0000 */
   25790             :   #elif defined(_MSC_VER)
   25791             :   #pragma message ("The buffer protocol is not supported in the Limited C-API < 3.11.")
   25792             :   #else
   25793             :   #warning "The buffer protocol is not supported in the Limited C-API < 3.11."
   25794             :   #endif
   25795             :   if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_array_spec, __pyx_array_type) < 0) __PYX_ERR(1, 114, __pyx_L1_error)
   25796             :   #else
   25797           1 :   __pyx_array_type = &__pyx_type___pyx_array;
   25798             :   #endif
   25799             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   25800             :   #endif
   25801             :   #if !CYTHON_USE_TYPE_SPECS
   25802           1 :   if (__Pyx_PyType_Ready(__pyx_array_type) < 0) __PYX_ERR(1, 114, __pyx_L1_error)
   25803             :   #endif
   25804             :   #if PY_MAJOR_VERSION < 3
   25805             :   __pyx_array_type->tp_print = 0;
   25806             :   #endif
   25807           1 :   if (__Pyx_SetVtable(__pyx_array_type, __pyx_vtabptr_array) < 0) __PYX_ERR(1, 114, __pyx_L1_error)
   25808             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   25809           1 :   if (__Pyx_MergeVtables(__pyx_array_type) < 0) __PYX_ERR(1, 114, __pyx_L1_error)
   25810             :   #endif
   25811             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   25812           1 :   if (__Pyx_setup_reduce((PyObject *) __pyx_array_type) < 0) __PYX_ERR(1, 114, __pyx_L1_error)
   25813             :   #endif
   25814             :   #if CYTHON_USE_TYPE_SPECS
   25815             :   __pyx_MemviewEnum_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_MemviewEnum_spec, NULL); if (unlikely(!__pyx_MemviewEnum_type)) __PYX_ERR(1, 302, __pyx_L1_error)
   25816             :   if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_MemviewEnum_spec, __pyx_MemviewEnum_type) < 0) __PYX_ERR(1, 302, __pyx_L1_error)
   25817             :   #else
   25818           1 :   __pyx_MemviewEnum_type = &__pyx_type___pyx_MemviewEnum;
   25819             :   #endif
   25820             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   25821             :   #endif
   25822             :   #if !CYTHON_USE_TYPE_SPECS
   25823           1 :   if (__Pyx_PyType_Ready(__pyx_MemviewEnum_type) < 0) __PYX_ERR(1, 302, __pyx_L1_error)
   25824             :   #endif
   25825             :   #if PY_MAJOR_VERSION < 3
   25826             :   __pyx_MemviewEnum_type->tp_print = 0;
   25827             :   #endif
   25828             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   25829           1 :   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_MemviewEnum_type->tp_dictoffset && __pyx_MemviewEnum_type->tp_getattro == PyObject_GenericGetAttr)) {
   25830           1 :     __pyx_MemviewEnum_type->tp_getattro = __Pyx_PyObject_GenericGetAttr;
   25831             :   }
   25832             :   #endif
   25833             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   25834           1 :   if (__Pyx_setup_reduce((PyObject *) __pyx_MemviewEnum_type) < 0) __PYX_ERR(1, 302, __pyx_L1_error)
   25835             :   #endif
   25836           1 :   __pyx_vtabptr_memoryview = &__pyx_vtable_memoryview;
   25837           1 :   __pyx_vtable_memoryview.get_item_pointer = (char *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_get_item_pointer;
   25838           1 :   __pyx_vtable_memoryview.is_slice = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_is_slice;
   25839           1 :   __pyx_vtable_memoryview.setitem_slice_assignment = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_slice_assignment;
   25840           1 :   __pyx_vtable_memoryview.setitem_slice_assign_scalar = (PyObject *(*)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_setitem_slice_assign_scalar;
   25841           1 :   __pyx_vtable_memoryview.setitem_indexed = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_indexed;
   25842           1 :   __pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
   25843           1 :   __pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
   25844           1 :   __pyx_vtable_memoryview._get_base = (PyObject *(*)(struct __pyx_memoryview_obj *))__pyx_memoryview__get_base;
   25845             :   #if CYTHON_USE_TYPE_SPECS
   25846             :   __pyx_memoryview_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_memoryview_spec, NULL); if (unlikely(!__pyx_memoryview_type)) __PYX_ERR(1, 337, __pyx_L1_error)
   25847             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   25848             :   __pyx_memoryview_type->tp_as_buffer = &__pyx_tp_as_buffer_memoryview;
   25849             :   if (!__pyx_memoryview_type->tp_as_buffer->bf_releasebuffer && __pyx_memoryview_type->tp_base->tp_as_buffer && __pyx_memoryview_type->tp_base->tp_as_buffer->bf_releasebuffer) {
   25850             :     __pyx_memoryview_type->tp_as_buffer->bf_releasebuffer = __pyx_memoryview_type->tp_base->tp_as_buffer->bf_releasebuffer;
   25851             :   }
   25852             :   #elif defined(Py_bf_getbuffer) && defined(Py_bf_releasebuffer)
   25853             :   /* PY_VERSION_HEX >= 0x03090000 || Py_LIMITED_API >= 0x030B0000 */
   25854             :   #elif defined(_MSC_VER)
   25855             :   #pragma message ("The buffer protocol is not supported in the Limited C-API < 3.11.")
   25856             :   #else
   25857             :   #warning "The buffer protocol is not supported in the Limited C-API < 3.11."
   25858             :   #endif
   25859             :   if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_memoryview_spec, __pyx_memoryview_type) < 0) __PYX_ERR(1, 337, __pyx_L1_error)
   25860             :   #else
   25861           1 :   __pyx_memoryview_type = &__pyx_type___pyx_memoryview;
   25862             :   #endif
   25863             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   25864             :   #endif
   25865             :   #if !CYTHON_USE_TYPE_SPECS
   25866           1 :   if (__Pyx_PyType_Ready(__pyx_memoryview_type) < 0) __PYX_ERR(1, 337, __pyx_L1_error)
   25867             :   #endif
   25868             :   #if PY_MAJOR_VERSION < 3
   25869             :   __pyx_memoryview_type->tp_print = 0;
   25870             :   #endif
   25871             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   25872           1 :   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_memoryview_type->tp_dictoffset && __pyx_memoryview_type->tp_getattro == PyObject_GenericGetAttr)) {
   25873           1 :     __pyx_memoryview_type->tp_getattro = __Pyx_PyObject_GenericGetAttr;
   25874             :   }
   25875             :   #endif
   25876           1 :   if (__Pyx_SetVtable(__pyx_memoryview_type, __pyx_vtabptr_memoryview) < 0) __PYX_ERR(1, 337, __pyx_L1_error)
   25877             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   25878           1 :   if (__Pyx_MergeVtables(__pyx_memoryview_type) < 0) __PYX_ERR(1, 337, __pyx_L1_error)
   25879             :   #endif
   25880             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   25881           1 :   if (__Pyx_setup_reduce((PyObject *) __pyx_memoryview_type) < 0) __PYX_ERR(1, 337, __pyx_L1_error)
   25882             :   #endif
   25883           1 :   __pyx_vtabptr__memoryviewslice = &__pyx_vtable__memoryviewslice;
   25884           1 :   __pyx_vtable__memoryviewslice.__pyx_base = *__pyx_vtabptr_memoryview;
   25885           1 :   __pyx_vtable__memoryviewslice.__pyx_base.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryviewslice_convert_item_to_object;
   25886           1 :   __pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
   25887           1 :   __pyx_vtable__memoryviewslice.__pyx_base._get_base = (PyObject *(*)(struct __pyx_memoryview_obj *))__pyx_memoryviewslice__get_base;
   25888             :   #if CYTHON_USE_TYPE_SPECS
   25889             :   __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_memoryview_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 952, __pyx_L1_error)
   25890             :   __Pyx_GOTREF(__pyx_t_1);
   25891             :   __pyx_memoryviewslice_type = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type___pyx_memoryviewslice_spec, __pyx_t_1);
   25892             :   __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   25893             :   if (unlikely(!__pyx_memoryviewslice_type)) __PYX_ERR(1, 952, __pyx_L1_error)
   25894             :   if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type___pyx_memoryviewslice_spec, __pyx_memoryviewslice_type) < 0) __PYX_ERR(1, 952, __pyx_L1_error)
   25895             :   #else
   25896           1 :   __pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice;
   25897             :   #endif
   25898             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   25899           1 :   __pyx_memoryviewslice_type->tp_base = __pyx_memoryview_type;
   25900             :   #endif
   25901             :   #if !CYTHON_USE_TYPE_SPECS
   25902           1 :   if (__Pyx_PyType_Ready(__pyx_memoryviewslice_type) < 0) __PYX_ERR(1, 952, __pyx_L1_error)
   25903             :   #endif
   25904             :   #if PY_MAJOR_VERSION < 3
   25905             :   __pyx_memoryviewslice_type->tp_print = 0;
   25906             :   #endif
   25907             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   25908           1 :   if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_memoryviewslice_type->tp_dictoffset && __pyx_memoryviewslice_type->tp_getattro == PyObject_GenericGetAttr)) {
   25909           1 :     __pyx_memoryviewslice_type->tp_getattro = __Pyx_PyObject_GenericGetAttr;
   25910             :   }
   25911             :   #endif
   25912           1 :   if (__Pyx_SetVtable(__pyx_memoryviewslice_type, __pyx_vtabptr__memoryviewslice) < 0) __PYX_ERR(1, 952, __pyx_L1_error)
   25913             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   25914           1 :   if (__Pyx_MergeVtables(__pyx_memoryviewslice_type) < 0) __PYX_ERR(1, 952, __pyx_L1_error)
   25915             :   #endif
   25916             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   25917           1 :   if (__Pyx_setup_reduce((PyObject *) __pyx_memoryviewslice_type) < 0) __PYX_ERR(1, 952, __pyx_L1_error)
   25918             :   #endif
   25919             :   __Pyx_RefNannyFinishContext();
   25920             :   return 0;
   25921           0 :   __pyx_L1_error:;
   25922           0 :   __Pyx_XDECREF(__pyx_t_1);
   25923           0 :   __Pyx_RefNannyFinishContext();
   25924           0 :   return -1;
   25925             : }
   25926             : 
   25927           1 : static int __Pyx_modinit_type_import_code(void) {
   25928             :   __Pyx_RefNannyDeclarations
   25929           1 :   PyObject *__pyx_t_1 = NULL;
   25930           1 :   int __pyx_lineno = 0;
   25931           1 :   const char *__pyx_filename = NULL;
   25932           1 :   int __pyx_clineno = 0;
   25933           1 :   __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
   25934             :   /*--- Type import code ---*/
   25935           1 :   __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error)
   25936           1 :   __Pyx_GOTREF(__pyx_t_1);
   25937           1 :   __pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_0_11(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", 
   25938             :   #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
   25939             :   sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyTypeObject),
   25940             :   #elif CYTHON_COMPILING_IN_LIMITED_API
   25941             :   sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyTypeObject),
   25942             :   #else
   25943             :   sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyHeapTypeObject),
   25944             :   #endif
   25945           1 :   __Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error)
   25946           1 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   25947           1 :   __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 271, __pyx_L1_error)
   25948           1 :   __Pyx_GOTREF(__pyx_t_1);
   25949           1 :   __pyx_ptype_5numpy_dtype = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyArray_Descr),__Pyx_ImportType_CheckSize_Ignore_3_0_11); if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 271, __pyx_L1_error)
   25950           1 :   __pyx_ptype_5numpy_flatiter = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyArrayIterObject),__Pyx_ImportType_CheckSize_Ignore_3_0_11); if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 316, __pyx_L1_error)
   25951           1 :   __pyx_ptype_5numpy_broadcast = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyArrayMultiIterObject),__Pyx_ImportType_CheckSize_Ignore_3_0_11); if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 320, __pyx_L1_error)
   25952           1 :   __pyx_ptype_5numpy_ndarray = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyArrayObject),__Pyx_ImportType_CheckSize_Ignore_3_0_11); if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 359, __pyx_L1_error)
   25953           1 :   __pyx_ptype_5numpy_generic = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_generic) __PYX_ERR(2, 847, __pyx_L1_error)
   25954           1 :   __pyx_ptype_5numpy_number = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "number", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_number) __PYX_ERR(2, 849, __pyx_L1_error)
   25955           1 :   __pyx_ptype_5numpy_integer = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_integer) __PYX_ERR(2, 851, __pyx_L1_error)
   25956           1 :   __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 853, __pyx_L1_error)
   25957           1 :   __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 855, __pyx_L1_error)
   25958           1 :   __pyx_ptype_5numpy_inexact = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 857, __pyx_L1_error)
   25959           1 :   __pyx_ptype_5numpy_floating = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_floating) __PYX_ERR(2, 859, __pyx_L1_error)
   25960           1 :   __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 861, __pyx_L1_error)
   25961           1 :   __pyx_ptype_5numpy_flexible = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 863, __pyx_L1_error)
   25962           1 :   __pyx_ptype_5numpy_character = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "character", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_5numpy_character) __PYX_ERR(2, 865, __pyx_L1_error)
   25963           1 :   __pyx_ptype_5numpy_ufunc = __Pyx_ImportType_3_0_11(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyUFuncObject),__Pyx_ImportType_CheckSize_Ignore_3_0_11); if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 929, __pyx_L1_error)
   25964           1 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   25965             :   __Pyx_RefNannyFinishContext();
   25966             :   return 0;
   25967           0 :   __pyx_L1_error:;
   25968           0 :   __Pyx_XDECREF(__pyx_t_1);
   25969           0 :   __Pyx_RefNannyFinishContext();
   25970           0 :   return -1;
   25971             : }
   25972             : 
   25973             : static int __Pyx_modinit_variable_import_code(void) {
   25974             :   __Pyx_RefNannyDeclarations
   25975             :   __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
   25976             :   /*--- Variable import code ---*/
   25977             :   __Pyx_RefNannyFinishContext();
   25978             :   return 0;
   25979             : }
   25980             : 
   25981           1 : static int __Pyx_modinit_function_import_code(void) {
   25982             :   __Pyx_RefNannyDeclarations
   25983           1 :   PyObject *__pyx_t_1 = NULL;
   25984           1 :   int __pyx_lineno = 0;
   25985           1 :   const char *__pyx_filename = NULL;
   25986           1 :   int __pyx_clineno = 0;
   25987           1 :   __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
   25988             :   /*--- Function import code ---*/
   25989           1 :   __pyx_t_1 = PyImport_ImportModule("scipy.linalg.cython_lapack"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
   25990           1 :   __Pyx_GOTREF(__pyx_t_1);
   25991           1 :   if (__Pyx_ImportFunction_3_0_11(__pyx_t_1, "cgetrf", (void (**)(void))&__pyx_f_5scipy_6linalg_13cython_lapack_cgetrf, "void (int *, int *, __pyx_t_float_complex *, int *, int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   25992           1 :   if (__Pyx_ImportFunction_3_0_11(__pyx_t_1, "dgetrf", (void (**)(void))&__pyx_f_5scipy_6linalg_13cython_lapack_dgetrf, "void (int *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_d *, int *, int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   25993           1 :   if (__Pyx_ImportFunction_3_0_11(__pyx_t_1, "sgetrf", (void (**)(void))&__pyx_f_5scipy_6linalg_13cython_lapack_sgetrf, "void (int *, int *, __pyx_t_5scipy_6linalg_13cython_lapack_s *, int *, int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   25994           1 :   if (__Pyx_ImportFunction_3_0_11(__pyx_t_1, "zgetrf", (void (**)(void))&__pyx_f_5scipy_6linalg_13cython_lapack_zgetrf, "void (int *, int *, __pyx_t_double_complex *, int *, int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   25995           1 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   25996           1 :   __pyx_t_1 = PyImport_ImportModule("scipy.linalg._cythonized_array_utils"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
   25997           1 :   __Pyx_GOTREF(__pyx_t_1);
   25998           1 :   if (__Pyx_ImportFunction_3_0_11(__pyx_t_1, "__pyx_fuse_0swap_c_and_f_layout", (void (**)(void))&__pyx_fuse_0__pyx_f_5scipy_6linalg_23_cythonized_array_utils_swap_c_and_f_layout, "void (float *, float *, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   25999           1 :   if (__Pyx_ImportFunction_3_0_11(__pyx_t_1, "__pyx_fuse_1swap_c_and_f_layout", (void (**)(void))&__pyx_fuse_1__pyx_f_5scipy_6linalg_23_cythonized_array_utils_swap_c_and_f_layout, "void (double *, double *, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   26000           1 :   if (__Pyx_ImportFunction_3_0_11(__pyx_t_1, "__pyx_fuse_2swap_c_and_f_layout", (void (**)(void))&__pyx_fuse_2__pyx_f_5scipy_6linalg_23_cythonized_array_utils_swap_c_and_f_layout, "void (__pyx_t_float_complex *, __pyx_t_float_complex *, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   26001           1 :   if (__Pyx_ImportFunction_3_0_11(__pyx_t_1, "__pyx_fuse_3swap_c_and_f_layout", (void (**)(void))&__pyx_fuse_3__pyx_f_5scipy_6linalg_23_cythonized_array_utils_swap_c_and_f_layout, "void (__pyx_t_double_complex *, __pyx_t_double_complex *, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   26002           1 :   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   26003             :   __Pyx_RefNannyFinishContext();
   26004             :   return 0;
   26005           0 :   __pyx_L1_error:;
   26006           0 :   __Pyx_XDECREF(__pyx_t_1);
   26007           0 :   __Pyx_RefNannyFinishContext();
   26008           0 :   return -1;
   26009             : }
   26010             : 
   26011             : 
   26012             : #if PY_MAJOR_VERSION >= 3
   26013             : #if CYTHON_PEP489_MULTI_PHASE_INIT
   26014             : static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
   26015             : static int __pyx_pymod_exec__decomp_lu_cython(PyObject* module); /*proto*/
   26016             : static PyModuleDef_Slot __pyx_moduledef_slots[] = {
   26017             :   {Py_mod_create, (void*)__pyx_pymod_create},
   26018             :   {Py_mod_exec, (void*)__pyx_pymod_exec__decomp_lu_cython},
   26019             :   {0, NULL}
   26020             : };
   26021             : #endif
   26022             : 
   26023             : #ifdef __cplusplus
   26024             : namespace {
   26025             :   struct PyModuleDef __pyx_moduledef =
   26026             :   #else
   26027             :   static struct PyModuleDef __pyx_moduledef =
   26028             :   #endif
   26029             :   {
   26030             :       PyModuleDef_HEAD_INIT,
   26031             :       "_decomp_lu_cython",
   26032             :       0, /* m_doc */
   26033             :     #if CYTHON_PEP489_MULTI_PHASE_INIT
   26034             :       0, /* m_size */
   26035             :     #elif CYTHON_USE_MODULE_STATE
   26036             :       sizeof(__pyx_mstate), /* m_size */
   26037             :     #else
   26038             :       -1, /* m_size */
   26039             :     #endif
   26040             :       __pyx_methods /* m_methods */,
   26041             :     #if CYTHON_PEP489_MULTI_PHASE_INIT
   26042             :       __pyx_moduledef_slots, /* m_slots */
   26043             :     #else
   26044             :       NULL, /* m_reload */
   26045             :     #endif
   26046             :     #if CYTHON_USE_MODULE_STATE
   26047             :       __pyx_m_traverse, /* m_traverse */
   26048             :       __pyx_m_clear, /* m_clear */
   26049             :       NULL /* m_free */
   26050             :     #else
   26051             :       NULL, /* m_traverse */
   26052             :       NULL, /* m_clear */
   26053             :       NULL /* m_free */
   26054             :     #endif
   26055             :   };
   26056             :   #ifdef __cplusplus
   26057             : } /* anonymous namespace */
   26058             : #endif
   26059             : #endif
   26060             : 
   26061             : #ifndef CYTHON_NO_PYINIT_EXPORT
   26062             : #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
   26063             : #elif PY_MAJOR_VERSION < 3
   26064             : #ifdef __cplusplus
   26065             : #define __Pyx_PyMODINIT_FUNC extern "C" void
   26066             : #else
   26067             : #define __Pyx_PyMODINIT_FUNC void
   26068             : #endif
   26069             : #else
   26070             : #ifdef __cplusplus
   26071             : #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
   26072             : #else
   26073             : #define __Pyx_PyMODINIT_FUNC PyObject *
   26074             : #endif
   26075             : #endif
   26076             : 
   26077             : 
   26078             : #if PY_MAJOR_VERSION < 3
   26079             : __Pyx_PyMODINIT_FUNC init_decomp_lu_cython(void) CYTHON_SMALL_CODE; /*proto*/
   26080             : __Pyx_PyMODINIT_FUNC init_decomp_lu_cython(void)
   26081             : #else
   26082             : __Pyx_PyMODINIT_FUNC PyInit__decomp_lu_cython(void) CYTHON_SMALL_CODE; /*proto*/
   26083           1 : __Pyx_PyMODINIT_FUNC PyInit__decomp_lu_cython(void)
   26084             : #if CYTHON_PEP489_MULTI_PHASE_INIT
   26085             : {
   26086           1 :   return PyModuleDef_Init(&__pyx_moduledef);
   26087             : }
   26088           1 : static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
   26089             :     #if PY_VERSION_HEX >= 0x030700A1
   26090           1 :     static PY_INT64_T main_interpreter_id = -1;
   26091           1 :     PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
   26092           1 :     if (main_interpreter_id == -1) {
   26093           1 :         main_interpreter_id = current_id;
   26094           2 :         return (unlikely(current_id == -1)) ? -1 : 0;
   26095           0 :     } else if (unlikely(main_interpreter_id != current_id))
   26096             :     #else
   26097             :     static PyInterpreterState *main_interpreter = NULL;
   26098             :     PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
   26099             :     if (!main_interpreter) {
   26100             :         main_interpreter = current_interpreter;
   26101             :     } else if (unlikely(main_interpreter != current_interpreter))
   26102             :     #endif
   26103             :     {
   26104           0 :         PyErr_SetString(
   26105             :             PyExc_ImportError,
   26106             :             "Interpreter change detected - this module can only be loaded into one interpreter per process.");
   26107           0 :         return -1;
   26108             :     }
   26109             :     return 0;
   26110             : }
   26111             : #if CYTHON_COMPILING_IN_LIMITED_API
   26112             : static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *module, const char* from_name, const char* to_name, int allow_none)
   26113             : #else
   26114           4 : static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none)
   26115             : #endif
   26116             : {
   26117           4 :     PyObject *value = PyObject_GetAttrString(spec, from_name);
   26118           4 :     int result = 0;
   26119           4 :     if (likely(value)) {
   26120           4 :         if (allow_none || value != Py_None) {
   26121             : #if CYTHON_COMPILING_IN_LIMITED_API
   26122             :             result = PyModule_AddObject(module, to_name, value);
   26123             : #else
   26124           3 :             result = PyDict_SetItemString(moddict, to_name, value);
   26125             : #endif
   26126             :         }
   26127           4 :         Py_DECREF(value);
   26128           0 :     } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
   26129           0 :         PyErr_Clear();
   26130             :     } else {
   26131             :         result = -1;
   26132             :     }
   26133           4 :     return result;
   26134             : }
   26135           1 : static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) {
   26136           1 :     PyObject *module = NULL, *moddict, *modname;
   26137           1 :     CYTHON_UNUSED_VAR(def);
   26138           1 :     if (__Pyx_check_single_interpreter())
   26139             :         return NULL;
   26140           1 :     if (__pyx_m)
   26141           0 :         return __Pyx_NewRef(__pyx_m);
   26142           1 :     modname = PyObject_GetAttrString(spec, "name");
   26143           1 :     if (unlikely(!modname)) goto bad;
   26144           1 :     module = PyModule_NewObject(modname);
   26145           1 :     Py_DECREF(modname);
   26146           1 :     if (unlikely(!module)) goto bad;
   26147             : #if CYTHON_COMPILING_IN_LIMITED_API
   26148             :     moddict = module;
   26149             : #else
   26150           1 :     moddict = PyModule_GetDict(module);
   26151           1 :     if (unlikely(!moddict)) goto bad;
   26152             : #endif
   26153           1 :     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
   26154           1 :     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
   26155           1 :     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
   26156           1 :     if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
   26157             :     return module;
   26158           0 : bad:
   26159           0 :     Py_XDECREF(module);
   26160           0 :     return NULL;
   26161             : }
   26162             : 
   26163             : 
   26164           1 : static CYTHON_SMALL_CODE int __pyx_pymod_exec__decomp_lu_cython(PyObject *__pyx_pyinit_module)
   26165             : #endif
   26166             : #endif
   26167             : {
   26168           1 :   int stringtab_initialized = 0;
   26169             :   #if CYTHON_USE_MODULE_STATE
   26170             :   int pystate_addmodule_run = 0;
   26171             :   #endif
   26172           1 :   PyObject *__pyx_t_1 = NULL;
   26173           1 :   PyObject *__pyx_t_2 = NULL;
   26174           1 :   PyObject *__pyx_t_3 = NULL;
   26175           1 :   PyObject *__pyx_t_4 = NULL;
   26176           1 :   PyObject *__pyx_t_5 = NULL;
   26177           1 :   int __pyx_t_6;
   26178           1 :   PyObject *__pyx_t_7 = NULL;
   26179           1 :   static PyThread_type_lock __pyx_t_8[8];
   26180           1 :   int __pyx_t_9;
   26181           1 :   int __pyx_lineno = 0;
   26182           1 :   const char *__pyx_filename = NULL;
   26183           1 :   int __pyx_clineno = 0;
   26184             :   __Pyx_RefNannyDeclarations
   26185             :   #if CYTHON_PEP489_MULTI_PHASE_INIT
   26186           1 :   if (__pyx_m) {
   26187           0 :     if (__pyx_m == __pyx_pyinit_module) return 0;
   26188           0 :     PyErr_SetString(PyExc_RuntimeError, "Module '_decomp_lu_cython' has already been imported. Re-initialisation is not supported.");
   26189           0 :     return -1;
   26190             :   }
   26191             :   #elif PY_MAJOR_VERSION >= 3
   26192             :   if (__pyx_m) return __Pyx_NewRef(__pyx_m);
   26193             :   #endif
   26194             :   /*--- Module creation code ---*/
   26195             :   #if CYTHON_PEP489_MULTI_PHASE_INIT
   26196           1 :   __pyx_m = __pyx_pyinit_module;
   26197           1 :   Py_INCREF(__pyx_m);
   26198             :   #else
   26199             :   #if PY_MAJOR_VERSION < 3
   26200             :   __pyx_m = Py_InitModule4("_decomp_lu_cython", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
   26201             :   if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
   26202             :   #elif CYTHON_USE_MODULE_STATE
   26203             :   __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
   26204             :   {
   26205             :     int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef);
   26206             :     __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "_decomp_lu_cython" pseudovariable */
   26207             :     if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
   26208             :     pystate_addmodule_run = 1;
   26209             :   }
   26210             :   #else
   26211             :   __pyx_m = PyModule_Create(&__pyx_moduledef);
   26212             :   if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
   26213             :   #endif
   26214             :   #endif
   26215           1 :   CYTHON_UNUSED_VAR(__pyx_t_1);
   26216           1 :   __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
   26217           1 :   Py_INCREF(__pyx_d);
   26218           1 :   __pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
   26219           1 :   __pyx_cython_runtime = __Pyx_PyImport_AddModuleRef((const char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
   26220           1 :   if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   26221             :   #if CYTHON_REFNANNY
   26222             : __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
   26223             : if (!__Pyx_RefNanny) {
   26224             :   PyErr_Clear();
   26225             :   __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
   26226             :   if (!__Pyx_RefNanny)
   26227             :       Py_FatalError("failed to import 'refnanny' module");
   26228             : }
   26229             : #endif
   26230           1 :   __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit__decomp_lu_cython(void)", 0);
   26231           1 :   if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   26232             :   #ifdef __Pxy_PyFrame_Initialize_Offsets
   26233             :   __Pxy_PyFrame_Initialize_Offsets();
   26234             :   #endif
   26235           1 :   __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
   26236           1 :   __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
   26237           1 :   __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
   26238             :   #ifdef __Pyx_CyFunction_USED
   26239           1 :   if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   26240             :   #endif
   26241             :   #ifdef __Pyx_FusedFunction_USED
   26242             :   if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   26243             :   #endif
   26244             :   #ifdef __Pyx_Coroutine_USED
   26245             :   if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   26246             :   #endif
   26247             :   #ifdef __Pyx_Generator_USED
   26248             :   if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   26249             :   #endif
   26250             :   #ifdef __Pyx_AsyncGen_USED
   26251             :   if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   26252             :   #endif
   26253             :   #ifdef __Pyx_StopAsyncIteration_USED
   26254             :   if (__pyx_StopAsyncIteration_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   26255             :   #endif
   26256             :   /*--- Library function declarations ---*/
   26257             :   /*--- Threads initialization code ---*/
   26258             :   #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
   26259             :   PyEval_InitThreads();
   26260             :   #endif
   26261             :   /*--- Initialize various global constants etc. ---*/
   26262           1 :   if (__Pyx_InitConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   26263           1 :   stringtab_initialized = 1;
   26264           1 :   if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   26265             :   #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
   26266             :   if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   26267             :   #endif
   26268           1 :   if (__pyx_module_is_main_scipy__linalg___decomp_lu_cython) {
   26269           0 :     if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   26270             :   }
   26271             :   #if PY_MAJOR_VERSION >= 3
   26272             :   {
   26273           1 :     PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
   26274           1 :     if (!PyDict_GetItemString(modules, "scipy.linalg._decomp_lu_cython")) {
   26275           0 :       if (unlikely((PyDict_SetItemString(modules, "scipy.linalg._decomp_lu_cython", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
   26276             :     }
   26277             :   }
   26278             :   #endif
   26279             :   /*--- Builtin init code ---*/
   26280           1 :   if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   26281             :   /*--- Constants init code ---*/
   26282           1 :   if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   26283             :   /*--- Global type/function init code ---*/
   26284           1 :   (void)__Pyx_modinit_global_init_code();
   26285           1 :   (void)__Pyx_modinit_variable_export_code();
   26286           1 :   (void)__Pyx_modinit_function_export_code();
   26287           1 :   if (unlikely((__Pyx_modinit_type_init_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
   26288           1 :   if (unlikely((__Pyx_modinit_type_import_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
   26289           1 :   (void)__Pyx_modinit_variable_import_code();
   26290           1 :   if (unlikely((__Pyx_modinit_function_import_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
   26291             :   /*--- Execution code ---*/
   26292             :   #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
   26293             :   if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   26294             :   #endif
   26295             : 
   26296             :   /* "View.MemoryView":99
   26297             :  * 
   26298             :  * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
   26299             :  * try:             # <<<<<<<<<<<<<<
   26300             :  *     if __import__("sys").version_info >= (3, 3):
   26301             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
   26302             :  */
   26303             :   {
   26304           1 :     __Pyx_PyThreadState_declare
   26305           1 :     __Pyx_PyThreadState_assign
   26306           1 :     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
   26307           1 :     __Pyx_XGOTREF(__pyx_t_1);
   26308           1 :     __Pyx_XGOTREF(__pyx_t_2);
   26309           1 :     __Pyx_XGOTREF(__pyx_t_3);
   26310             :     /*try:*/ {
   26311             : 
   26312             :       /* "View.MemoryView":100
   26313             :  * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
   26314             :  * try:
   26315             :  *     if __import__("sys").version_info >= (3, 3):             # <<<<<<<<<<<<<<
   26316             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
   26317             :  *     else:
   26318             :  */
   26319           1 :       __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 100, __pyx_L2_error)
   26320           1 :       __Pyx_GOTREF(__pyx_t_4);
   26321           1 :       __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_version_info); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 100, __pyx_L2_error)
   26322           1 :       __Pyx_GOTREF(__pyx_t_5);
   26323           1 :       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   26324           1 :       __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_tuple__62, Py_GE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 100, __pyx_L2_error)
   26325           1 :       __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   26326           1 :       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 100, __pyx_L2_error)
   26327           1 :       __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   26328           1 :       if (__pyx_t_6) {
   26329             : 
   26330             :         /* "View.MemoryView":101
   26331             :  * try:
   26332             :  *     if __import__("sys").version_info >= (3, 3):
   26333             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence             # <<<<<<<<<<<<<<
   26334             :  *     else:
   26335             :  *         __pyx_collections_abc_Sequence = __import__("collections").Sequence
   26336             :  */
   26337           1 :         __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 101, __pyx_L2_error)
   26338           1 :         __Pyx_GOTREF(__pyx_t_4);
   26339           1 :         __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_abc); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 101, __pyx_L2_error)
   26340           1 :         __Pyx_GOTREF(__pyx_t_5);
   26341           1 :         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   26342           1 :         __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_Sequence); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 101, __pyx_L2_error)
   26343           1 :         __Pyx_GOTREF(__pyx_t_4);
   26344           1 :         __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
   26345           1 :         __Pyx_XGOTREF(__pyx_collections_abc_Sequence);
   26346           1 :         __Pyx_DECREF_SET(__pyx_collections_abc_Sequence, __pyx_t_4);
   26347           1 :         __Pyx_GIVEREF(__pyx_t_4);
   26348           1 :         __pyx_t_4 = 0;
   26349             : 
   26350             :         /* "View.MemoryView":100
   26351             :  * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
   26352             :  * try:
   26353             :  *     if __import__("sys").version_info >= (3, 3):             # <<<<<<<<<<<<<<
   26354             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
   26355             :  *     else:
   26356             :  */
   26357           1 :         goto __pyx_L8;
   26358             :       }
   26359             : 
   26360             :       /* "View.MemoryView":103
   26361             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
   26362             :  *     else:
   26363             :  *         __pyx_collections_abc_Sequence = __import__("collections").Sequence             # <<<<<<<<<<<<<<
   26364             :  * except:
   26365             :  * 
   26366             :  */
   26367             :       /*else*/ {
   26368           0 :         __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin___import__, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 103, __pyx_L2_error)
   26369           0 :         __Pyx_GOTREF(__pyx_t_4);
   26370           0 :         __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_Sequence); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 103, __pyx_L2_error)
   26371           0 :         __Pyx_GOTREF(__pyx_t_5);
   26372           0 :         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   26373           0 :         __Pyx_XGOTREF(__pyx_collections_abc_Sequence);
   26374           0 :         __Pyx_DECREF_SET(__pyx_collections_abc_Sequence, __pyx_t_5);
   26375           0 :         __Pyx_GIVEREF(__pyx_t_5);
   26376           0 :         __pyx_t_5 = 0;
   26377             :       }
   26378           1 :       __pyx_L8:;
   26379             : 
   26380             :       /* "View.MemoryView":99
   26381             :  * 
   26382             :  * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
   26383             :  * try:             # <<<<<<<<<<<<<<
   26384             :  *     if __import__("sys").version_info >= (3, 3):
   26385             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
   26386             :  */
   26387             :     }
   26388           1 :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   26389           1 :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   26390           1 :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   26391           1 :     goto __pyx_L7_try_end;
   26392           0 :     __pyx_L2_error:;
   26393           0 :     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
   26394           0 :     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
   26395             : 
   26396             :     /* "View.MemoryView":104
   26397             :  *     else:
   26398             :  *         __pyx_collections_abc_Sequence = __import__("collections").Sequence
   26399             :  * except:             # <<<<<<<<<<<<<<
   26400             :  * 
   26401             :  *     __pyx_collections_abc_Sequence = None
   26402             :  */
   26403             :     /*except:*/ {
   26404           0 :       __Pyx_AddTraceback("View.MemoryView", __pyx_clineno, __pyx_lineno, __pyx_filename);
   26405           0 :       if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_7) < 0) __PYX_ERR(1, 104, __pyx_L4_except_error)
   26406           0 :       __Pyx_XGOTREF(__pyx_t_5);
   26407           0 :       __Pyx_XGOTREF(__pyx_t_4);
   26408           0 :       __Pyx_XGOTREF(__pyx_t_7);
   26409             : 
   26410             :       /* "View.MemoryView":106
   26411             :  * except:
   26412             :  * 
   26413             :  *     __pyx_collections_abc_Sequence = None             # <<<<<<<<<<<<<<
   26414             :  * 
   26415             :  * 
   26416             :  */
   26417           0 :       __Pyx_INCREF(Py_None);
   26418           0 :       __Pyx_XGOTREF(__pyx_collections_abc_Sequence);
   26419           0 :       __Pyx_DECREF_SET(__pyx_collections_abc_Sequence, Py_None);
   26420           0 :       __Pyx_GIVEREF(Py_None);
   26421           0 :       __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
   26422           0 :       __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
   26423           0 :       __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
   26424           0 :       goto __pyx_L3_exception_handled;
   26425             :     }
   26426             : 
   26427             :     /* "View.MemoryView":99
   26428             :  * 
   26429             :  * cdef object __pyx_collections_abc_Sequence "__pyx_collections_abc_Sequence"
   26430             :  * try:             # <<<<<<<<<<<<<<
   26431             :  *     if __import__("sys").version_info >= (3, 3):
   26432             :  *         __pyx_collections_abc_Sequence = __import__("collections.abc").abc.Sequence
   26433             :  */
   26434           0 :     __pyx_L4_except_error:;
   26435           0 :     __Pyx_XGIVEREF(__pyx_t_1);
   26436           0 :     __Pyx_XGIVEREF(__pyx_t_2);
   26437           0 :     __Pyx_XGIVEREF(__pyx_t_3);
   26438           0 :     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
   26439           0 :     goto __pyx_L1_error;
   26440           0 :     __pyx_L3_exception_handled:;
   26441           0 :     __Pyx_XGIVEREF(__pyx_t_1);
   26442           0 :     __Pyx_XGIVEREF(__pyx_t_2);
   26443           0 :     __Pyx_XGIVEREF(__pyx_t_3);
   26444           0 :     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
   26445           1 :     __pyx_L7_try_end:;
   26446             :   }
   26447             : 
   26448             :   /* "View.MemoryView":241
   26449             :  * 
   26450             :  * 
   26451             :  *     try:             # <<<<<<<<<<<<<<
   26452             :  *         count = __pyx_collections_abc_Sequence.count
   26453             :  *         index = __pyx_collections_abc_Sequence.index
   26454             :  */
   26455             :   {
   26456           1 :     __Pyx_PyThreadState_declare
   26457           1 :     __Pyx_PyThreadState_assign
   26458           1 :     __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1);
   26459           1 :     __Pyx_XGOTREF(__pyx_t_3);
   26460           1 :     __Pyx_XGOTREF(__pyx_t_2);
   26461           1 :     __Pyx_XGOTREF(__pyx_t_1);
   26462             :     /*try:*/ {
   26463             : 
   26464             :       /* "View.MemoryView":242
   26465             :  * 
   26466             :  *     try:
   26467             :  *         count = __pyx_collections_abc_Sequence.count             # <<<<<<<<<<<<<<
   26468             :  *         index = __pyx_collections_abc_Sequence.index
   26469             :  *     except:
   26470             :  */
   26471           1 :       __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 242, __pyx_L11_error)
   26472           1 :       __Pyx_GOTREF(__pyx_t_7);
   26473           1 :       if (__Pyx_SetItemOnTypeDict(__pyx_array_type, __pyx_n_s_count, __pyx_t_7) < 0) __PYX_ERR(1, 242, __pyx_L11_error)
   26474           1 :       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   26475           1 :       PyType_Modified(__pyx_array_type);
   26476             : 
   26477             :       /* "View.MemoryView":243
   26478             :  *     try:
   26479             :  *         count = __pyx_collections_abc_Sequence.count
   26480             :  *         index = __pyx_collections_abc_Sequence.index             # <<<<<<<<<<<<<<
   26481             :  *     except:
   26482             :  *         pass
   26483             :  */
   26484           1 :       __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_index); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 243, __pyx_L11_error)
   26485           1 :       __Pyx_GOTREF(__pyx_t_7);
   26486           1 :       if (__Pyx_SetItemOnTypeDict(__pyx_array_type, __pyx_n_s_index, __pyx_t_7) < 0) __PYX_ERR(1, 243, __pyx_L11_error)
   26487           1 :       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   26488           1 :       PyType_Modified(__pyx_array_type);
   26489             : 
   26490             :       /* "View.MemoryView":241
   26491             :  * 
   26492             :  * 
   26493             :  *     try:             # <<<<<<<<<<<<<<
   26494             :  *         count = __pyx_collections_abc_Sequence.count
   26495             :  *         index = __pyx_collections_abc_Sequence.index
   26496             :  */
   26497             :     }
   26498           1 :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   26499           1 :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   26500           1 :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   26501           1 :     goto __pyx_L16_try_end;
   26502           0 :     __pyx_L11_error:;
   26503           0 :     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
   26504           0 :     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
   26505           0 :     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
   26506             : 
   26507             :     /* "View.MemoryView":244
   26508             :  *         count = __pyx_collections_abc_Sequence.count
   26509             :  *         index = __pyx_collections_abc_Sequence.index
   26510             :  *     except:             # <<<<<<<<<<<<<<
   26511             :  *         pass
   26512             :  * 
   26513             :  */
   26514             :     /*except:*/ {
   26515           0 :       __Pyx_ErrRestore(0,0,0);
   26516           0 :       goto __pyx_L12_exception_handled;
   26517             :     }
   26518           0 :     __pyx_L12_exception_handled:;
   26519           0 :     __Pyx_XGIVEREF(__pyx_t_3);
   26520           0 :     __Pyx_XGIVEREF(__pyx_t_2);
   26521           0 :     __Pyx_XGIVEREF(__pyx_t_1);
   26522           0 :     __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
   26523           1 :     __pyx_L16_try_end:;
   26524             :   }
   26525             : 
   26526             :   /* "View.MemoryView":309
   26527             :  *         return self.name
   26528             :  * 
   26529             :  * cdef generic = Enum("<strided and direct or indirect>")             # <<<<<<<<<<<<<<
   26530             :  * cdef strided = Enum("<strided and direct>") # default
   26531             :  * cdef indirect = Enum("<strided and indirect>")
   26532             :  */
   26533           1 :   __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 309, __pyx_L1_error)
   26534           1 :   __Pyx_GOTREF(__pyx_t_7);
   26535           1 :   __Pyx_XGOTREF(generic);
   26536           1 :   __Pyx_DECREF_SET(generic, __pyx_t_7);
   26537           1 :   __Pyx_GIVEREF(__pyx_t_7);
   26538           1 :   __pyx_t_7 = 0;
   26539             : 
   26540             :   /* "View.MemoryView":310
   26541             :  * 
   26542             :  * cdef generic = Enum("<strided and direct or indirect>")
   26543             :  * cdef strided = Enum("<strided and direct>") # default             # <<<<<<<<<<<<<<
   26544             :  * cdef indirect = Enum("<strided and indirect>")
   26545             :  * 
   26546             :  */
   26547           1 :   __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 310, __pyx_L1_error)
   26548           1 :   __Pyx_GOTREF(__pyx_t_7);
   26549           1 :   __Pyx_XGOTREF(strided);
   26550           1 :   __Pyx_DECREF_SET(strided, __pyx_t_7);
   26551           1 :   __Pyx_GIVEREF(__pyx_t_7);
   26552           1 :   __pyx_t_7 = 0;
   26553             : 
   26554             :   /* "View.MemoryView":311
   26555             :  * cdef generic = Enum("<strided and direct or indirect>")
   26556             :  * cdef strided = Enum("<strided and direct>") # default
   26557             :  * cdef indirect = Enum("<strided and indirect>")             # <<<<<<<<<<<<<<
   26558             :  * 
   26559             :  * 
   26560             :  */
   26561           1 :   __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__67, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 311, __pyx_L1_error)
   26562           1 :   __Pyx_GOTREF(__pyx_t_7);
   26563           1 :   __Pyx_XGOTREF(indirect);
   26564           1 :   __Pyx_DECREF_SET(indirect, __pyx_t_7);
   26565           1 :   __Pyx_GIVEREF(__pyx_t_7);
   26566           1 :   __pyx_t_7 = 0;
   26567             : 
   26568             :   /* "View.MemoryView":314
   26569             :  * 
   26570             :  * 
   26571             :  * cdef contiguous = Enum("<contiguous and direct>")             # <<<<<<<<<<<<<<
   26572             :  * cdef indirect_contiguous = Enum("<contiguous and indirect>")
   26573             :  * 
   26574             :  */
   26575           1 :   __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__68, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 314, __pyx_L1_error)
   26576           1 :   __Pyx_GOTREF(__pyx_t_7);
   26577           1 :   __Pyx_XGOTREF(contiguous);
   26578           1 :   __Pyx_DECREF_SET(contiguous, __pyx_t_7);
   26579           1 :   __Pyx_GIVEREF(__pyx_t_7);
   26580           1 :   __pyx_t_7 = 0;
   26581             : 
   26582             :   /* "View.MemoryView":315
   26583             :  * 
   26584             :  * cdef contiguous = Enum("<contiguous and direct>")
   26585             :  * cdef indirect_contiguous = Enum("<contiguous and indirect>")             # <<<<<<<<<<<<<<
   26586             :  * 
   26587             :  * 
   26588             :  */
   26589           1 :   __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__69, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 315, __pyx_L1_error)
   26590           1 :   __Pyx_GOTREF(__pyx_t_7);
   26591           1 :   __Pyx_XGOTREF(indirect_contiguous);
   26592           1 :   __Pyx_DECREF_SET(indirect_contiguous, __pyx_t_7);
   26593           1 :   __Pyx_GIVEREF(__pyx_t_7);
   26594           1 :   __pyx_t_7 = 0;
   26595             : 
   26596             :   /* "View.MemoryView":323
   26597             :  * 
   26598             :  * 
   26599             :  * cdef int __pyx_memoryview_thread_locks_used = 0             # <<<<<<<<<<<<<<
   26600             :  * cdef PyThread_type_lock[8] __pyx_memoryview_thread_locks = [
   26601             :  *     PyThread_allocate_lock(),
   26602             :  */
   26603           1 :   __pyx_memoryview_thread_locks_used = 0;
   26604             : 
   26605             :   /* "View.MemoryView":324
   26606             :  * 
   26607             :  * cdef int __pyx_memoryview_thread_locks_used = 0
   26608             :  * cdef PyThread_type_lock[8] __pyx_memoryview_thread_locks = [             # <<<<<<<<<<<<<<
   26609             :  *     PyThread_allocate_lock(),
   26610             :  *     PyThread_allocate_lock(),
   26611             :  */
   26612           1 :   __pyx_t_8[0] = PyThread_allocate_lock();
   26613           1 :   __pyx_t_8[1] = PyThread_allocate_lock();
   26614           1 :   __pyx_t_8[2] = PyThread_allocate_lock();
   26615           1 :   __pyx_t_8[3] = PyThread_allocate_lock();
   26616           1 :   __pyx_t_8[4] = PyThread_allocate_lock();
   26617           1 :   __pyx_t_8[5] = PyThread_allocate_lock();
   26618           1 :   __pyx_t_8[6] = PyThread_allocate_lock();
   26619           1 :   __pyx_t_8[7] = PyThread_allocate_lock();
   26620           1 :   memcpy(&(__pyx_memoryview_thread_locks[0]), __pyx_t_8, sizeof(__pyx_memoryview_thread_locks[0]) * (8));
   26621             : 
   26622             :   /* "View.MemoryView":982
   26623             :  * 
   26624             :  * 
   26625             :  *     try:             # <<<<<<<<<<<<<<
   26626             :  *         count = __pyx_collections_abc_Sequence.count
   26627             :  *         index = __pyx_collections_abc_Sequence.index
   26628             :  */
   26629             :   {
   26630           1 :     __Pyx_PyThreadState_declare
   26631           1 :     __Pyx_PyThreadState_assign
   26632           1 :     __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
   26633           1 :     __Pyx_XGOTREF(__pyx_t_1);
   26634           1 :     __Pyx_XGOTREF(__pyx_t_2);
   26635           1 :     __Pyx_XGOTREF(__pyx_t_3);
   26636             :     /*try:*/ {
   26637             : 
   26638             :       /* "View.MemoryView":983
   26639             :  * 
   26640             :  *     try:
   26641             :  *         count = __pyx_collections_abc_Sequence.count             # <<<<<<<<<<<<<<
   26642             :  *         index = __pyx_collections_abc_Sequence.index
   26643             :  *     except:
   26644             :  */
   26645           1 :       __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_count); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 983, __pyx_L17_error)
   26646           1 :       __Pyx_GOTREF(__pyx_t_7);
   26647           1 :       if (__Pyx_SetItemOnTypeDict(__pyx_memoryviewslice_type, __pyx_n_s_count, __pyx_t_7) < 0) __PYX_ERR(1, 983, __pyx_L17_error)
   26648           1 :       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   26649           1 :       PyType_Modified(__pyx_memoryviewslice_type);
   26650             : 
   26651             :       /* "View.MemoryView":984
   26652             :  *     try:
   26653             :  *         count = __pyx_collections_abc_Sequence.count
   26654             :  *         index = __pyx_collections_abc_Sequence.index             # <<<<<<<<<<<<<<
   26655             :  *     except:
   26656             :  *         pass
   26657             :  */
   26658           1 :       __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_index); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 984, __pyx_L17_error)
   26659           1 :       __Pyx_GOTREF(__pyx_t_7);
   26660           1 :       if (__Pyx_SetItemOnTypeDict(__pyx_memoryviewslice_type, __pyx_n_s_index, __pyx_t_7) < 0) __PYX_ERR(1, 984, __pyx_L17_error)
   26661           1 :       __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   26662           1 :       PyType_Modified(__pyx_memoryviewslice_type);
   26663             : 
   26664             :       /* "View.MemoryView":982
   26665             :  * 
   26666             :  * 
   26667             :  *     try:             # <<<<<<<<<<<<<<
   26668             :  *         count = __pyx_collections_abc_Sequence.count
   26669             :  *         index = __pyx_collections_abc_Sequence.index
   26670             :  */
   26671             :     }
   26672           1 :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   26673           1 :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   26674           1 :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   26675           1 :     goto __pyx_L22_try_end;
   26676           0 :     __pyx_L17_error:;
   26677           0 :     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
   26678           0 :     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
   26679           0 :     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
   26680             : 
   26681             :     /* "View.MemoryView":985
   26682             :  *         count = __pyx_collections_abc_Sequence.count
   26683             :  *         index = __pyx_collections_abc_Sequence.index
   26684             :  *     except:             # <<<<<<<<<<<<<<
   26685             :  *         pass
   26686             :  * 
   26687             :  */
   26688             :     /*except:*/ {
   26689           0 :       __Pyx_ErrRestore(0,0,0);
   26690           0 :       goto __pyx_L18_exception_handled;
   26691             :     }
   26692           0 :     __pyx_L18_exception_handled:;
   26693           0 :     __Pyx_XGIVEREF(__pyx_t_1);
   26694           0 :     __Pyx_XGIVEREF(__pyx_t_2);
   26695           0 :     __Pyx_XGIVEREF(__pyx_t_3);
   26696           0 :     __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
   26697           1 :     __pyx_L22_try_end:;
   26698             :   }
   26699             : 
   26700             :   /* "View.MemoryView":988
   26701             :  *         pass
   26702             :  * 
   26703             :  * try:             # <<<<<<<<<<<<<<
   26704             :  *     if __pyx_collections_abc_Sequence:
   26705             :  * 
   26706             :  */
   26707             :   {
   26708           1 :     __Pyx_PyThreadState_declare
   26709           1 :     __Pyx_PyThreadState_assign
   26710           1 :     __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1);
   26711           1 :     __Pyx_XGOTREF(__pyx_t_3);
   26712           1 :     __Pyx_XGOTREF(__pyx_t_2);
   26713           1 :     __Pyx_XGOTREF(__pyx_t_1);
   26714             :     /*try:*/ {
   26715             : 
   26716             :       /* "View.MemoryView":989
   26717             :  * 
   26718             :  * try:
   26719             :  *     if __pyx_collections_abc_Sequence:             # <<<<<<<<<<<<<<
   26720             :  * 
   26721             :  * 
   26722             :  */
   26723           1 :       __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_collections_abc_Sequence); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(1, 989, __pyx_L23_error)
   26724           1 :       if (__pyx_t_6) {
   26725             : 
   26726             :         /* "View.MemoryView":993
   26727             :  * 
   26728             :  * 
   26729             :  *         __pyx_collections_abc_Sequence.register(_memoryviewslice)             # <<<<<<<<<<<<<<
   26730             :  *         __pyx_collections_abc_Sequence.register(array)
   26731             :  * except:
   26732             :  */
   26733           1 :         __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_register); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 993, __pyx_L23_error)
   26734           1 :         __Pyx_GOTREF(__pyx_t_7);
   26735           1 :         __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_memoryviewslice_type)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 993, __pyx_L23_error)
   26736           1 :         __Pyx_GOTREF(__pyx_t_4);
   26737           1 :         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   26738           1 :         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   26739             : 
   26740             :         /* "View.MemoryView":994
   26741             :  * 
   26742             :  *         __pyx_collections_abc_Sequence.register(_memoryviewslice)
   26743             :  *         __pyx_collections_abc_Sequence.register(array)             # <<<<<<<<<<<<<<
   26744             :  * except:
   26745             :  *     pass  # ignore failure, it's a minor issue
   26746             :  */
   26747           1 :         __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_collections_abc_Sequence, __pyx_n_s_register); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 994, __pyx_L23_error)
   26748           1 :         __Pyx_GOTREF(__pyx_t_4);
   26749           1 :         __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_array_type)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 994, __pyx_L23_error)
   26750           1 :         __Pyx_GOTREF(__pyx_t_7);
   26751           1 :         __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   26752           2 :         __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   26753             : 
   26754             :         /* "View.MemoryView":989
   26755             :  * 
   26756             :  * try:
   26757             :  *     if __pyx_collections_abc_Sequence:             # <<<<<<<<<<<<<<
   26758             :  * 
   26759             :  * 
   26760             :  */
   26761             :       }
   26762             : 
   26763             :       /* "View.MemoryView":988
   26764             :  *         pass
   26765             :  * 
   26766             :  * try:             # <<<<<<<<<<<<<<
   26767             :  *     if __pyx_collections_abc_Sequence:
   26768             :  * 
   26769             :  */
   26770             :     }
   26771           1 :     __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
   26772           1 :     __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
   26773           1 :     __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
   26774           1 :     goto __pyx_L28_try_end;
   26775           0 :     __pyx_L23_error:;
   26776           0 :     __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
   26777           0 :     __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
   26778           0 :     __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
   26779             : 
   26780             :     /* "View.MemoryView":995
   26781             :  *         __pyx_collections_abc_Sequence.register(_memoryviewslice)
   26782             :  *         __pyx_collections_abc_Sequence.register(array)
   26783             :  * except:             # <<<<<<<<<<<<<<
   26784             :  *     pass  # ignore failure, it's a minor issue
   26785             :  * 
   26786             :  */
   26787             :     /*except:*/ {
   26788           0 :       __Pyx_ErrRestore(0,0,0);
   26789           0 :       goto __pyx_L24_exception_handled;
   26790             :     }
   26791           0 :     __pyx_L24_exception_handled:;
   26792           0 :     __Pyx_XGIVEREF(__pyx_t_3);
   26793           0 :     __Pyx_XGIVEREF(__pyx_t_2);
   26794           0 :     __Pyx_XGIVEREF(__pyx_t_1);
   26795           0 :     __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
   26796           1 :     __pyx_L28_try_end:;
   26797             :   }
   26798             : 
   26799             :   /* "(tree fragment)":1
   26800             :  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
   26801             :  *     cdef object __pyx_PickleError
   26802             :  *     cdef object __pyx_result
   26803             :  */
   26804           1 :   __pyx_t_7 = PyCFunction_NewEx(&__pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum, NULL, __pyx_n_s_View_MemoryView); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1, __pyx_L1_error)
   26805           1 :   __Pyx_GOTREF(__pyx_t_7);
   26806           1 :   if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Enum, __pyx_t_7) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
   26807           1 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   26808             : 
   26809             :   /* "scipy/linalg/_decomp_lu_cython.pyx":9
   26810             :  * 
   26811             :  * cimport numpy as cnp
   26812             :  * cnp.import_array()             # <<<<<<<<<<<<<<
   26813             :  * 
   26814             :  * ctypedef fused lapack_t:
   26815             :  */
   26816           1 :   __pyx_t_9 = __pyx_f_5numpy_import_array(); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 9, __pyx_L1_error)
   26817             : 
   26818             :   /* "scipy/linalg/_decomp_lu_cython.pyx":158
   26819             :  * 
   26820             :  * 
   26821             :  * @cython.nonecheck(False)             # <<<<<<<<<<<<<<
   26822             :  * @cython.initializedcheck(False)
   26823             :  * def lu_dispatcher(a, u, piv, permute_l):
   26824             :  */
   26825           1 :   __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_5scipy_6linalg_17_decomp_lu_cython_1lu_dispatcher, 0, __pyx_n_s_lu_dispatcher, NULL, __pyx_n_s_scipy_linalg__decomp_lu_cython, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 158, __pyx_L1_error)
   26826           1 :   __Pyx_GOTREF(__pyx_t_7);
   26827           1 :   if (PyDict_SetItem(__pyx_d, __pyx_n_s_lu_dispatcher, __pyx_t_7) < 0) __PYX_ERR(0, 158, __pyx_L1_error)
   26828           1 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   26829             : 
   26830             :   /* "scipy/linalg/_decomp_lu_cython.pyx":1
   26831             :  * # cython: language_level=3             # <<<<<<<<<<<<<<
   26832             :  * 
   26833             :  * import cython
   26834             :  */
   26835           1 :   __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1, __pyx_L1_error)
   26836           1 :   __Pyx_GOTREF(__pyx_t_7);
   26837           1 :   if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_7) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
   26838           1 :   __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
   26839             : 
   26840             :   /*--- Wrapped vars code ---*/
   26841             : 
   26842           1 :   goto __pyx_L0;
   26843           0 :   __pyx_L1_error:;
   26844           0 :   __Pyx_XDECREF(__pyx_t_4);
   26845           0 :   __Pyx_XDECREF(__pyx_t_5);
   26846           0 :   __Pyx_XDECREF(__pyx_t_7);
   26847           0 :   if (__pyx_m) {
   26848           0 :     if (__pyx_d && stringtab_initialized) {
   26849           0 :       __Pyx_AddTraceback("init scipy.linalg._decomp_lu_cython", __pyx_clineno, __pyx_lineno, __pyx_filename);
   26850             :     }
   26851             :     #if !CYTHON_USE_MODULE_STATE
   26852           0 :     Py_CLEAR(__pyx_m);
   26853             :     #else
   26854             :     Py_DECREF(__pyx_m);
   26855             :     if (pystate_addmodule_run) {
   26856             :       PyObject *tp, *value, *tb;
   26857             :       PyErr_Fetch(&tp, &value, &tb);
   26858             :       PyState_RemoveModule(&__pyx_moduledef);
   26859             :       PyErr_Restore(tp, value, tb);
   26860             :     }
   26861             :     #endif
   26862           0 :   } else if (!PyErr_Occurred()) {
   26863           0 :     PyErr_SetString(PyExc_ImportError, "init scipy.linalg._decomp_lu_cython");
   26864             :   }
   26865           0 :   __pyx_L0:;
   26866           1 :   __Pyx_RefNannyFinishContext();
   26867             :   #if CYTHON_PEP489_MULTI_PHASE_INIT
   26868           1 :   return (__pyx_m != NULL) ? 0 : -1;
   26869             :   #elif PY_MAJOR_VERSION >= 3
   26870             :   return __pyx_m;
   26871             :   #else
   26872             :   return;
   26873             :   #endif
   26874             : }
   26875             : /* #### Code section: cleanup_globals ### */
   26876             : /* #### Code section: cleanup_module ### */
   26877             : /* #### Code section: main_method ### */
   26878             : /* #### Code section: utility_code_pragmas ### */
   26879             : #ifdef _MSC_VER
   26880             : #pragma warning( push )
   26881             : /* Warning 4127: conditional expression is constant
   26882             :  * Cython uses constant conditional expressions to allow in inline functions to be optimized at
   26883             :  * compile-time, so this warning is not useful
   26884             :  */
   26885             : #pragma warning( disable : 4127 )
   26886             : #endif
   26887             : 
   26888             : 
   26889             : 
   26890             : /* #### Code section: utility_code_def ### */
   26891             : 
   26892             : /* --- Runtime support code --- */
   26893             : /* Refnanny */
   26894             : #if CYTHON_REFNANNY
   26895             : static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
   26896             :     PyObject *m = NULL, *p = NULL;
   26897             :     void *r = NULL;
   26898             :     m = PyImport_ImportModule(modname);
   26899             :     if (!m) goto end;
   26900             :     p = PyObject_GetAttrString(m, "RefNannyAPI");
   26901             :     if (!p) goto end;
   26902             :     r = PyLong_AsVoidPtr(p);
   26903             : end:
   26904             :     Py_XDECREF(p);
   26905             :     Py_XDECREF(m);
   26906             :     return (__Pyx_RefNannyAPIStruct *)r;
   26907             : }
   26908             : #endif
   26909             : 
   26910             : /* PyErrExceptionMatches */
   26911             : #if CYTHON_FAST_THREAD_STATE
   26912           0 : static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
   26913           0 :     Py_ssize_t i, n;
   26914           0 :     n = PyTuple_GET_SIZE(tuple);
   26915             : #if PY_MAJOR_VERSION >= 3
   26916           0 :     for (i=0; i<n; i++) {
   26917           0 :         if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
   26918             :     }
   26919             : #endif
   26920           0 :     for (i=0; i<n; i++) {
   26921           0 :         if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
   26922             :     }
   26923             :     return 0;
   26924             : }
   26925           3 : static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
   26926           3 :     int result;
   26927           3 :     PyObject *exc_type;
   26928             : #if PY_VERSION_HEX >= 0x030C00A6
   26929           3 :     PyObject *current_exception = tstate->current_exception;
   26930           3 :     if (unlikely(!current_exception)) return 0;
   26931           3 :     exc_type = (PyObject*) Py_TYPE(current_exception);
   26932           3 :     if (exc_type == err) return 1;
   26933             : #else
   26934             :     exc_type = tstate->curexc_type;
   26935             :     if (exc_type == err) return 1;
   26936             :     if (unlikely(!exc_type)) return 0;
   26937             : #endif
   26938             :     #if CYTHON_AVOID_BORROWED_REFS
   26939             :     Py_INCREF(exc_type);
   26940             :     #endif
   26941           0 :     if (unlikely(PyTuple_Check(err))) {
   26942           0 :         result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
   26943             :     } else {
   26944           0 :         result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
   26945             :     }
   26946             :     #if CYTHON_AVOID_BORROWED_REFS
   26947             :     Py_DECREF(exc_type);
   26948             :     #endif
   26949             :     return result;
   26950             : }
   26951             : #endif
   26952             : 
   26953             : /* PyErrFetchRestore */
   26954             : #if CYTHON_FAST_THREAD_STATE
   26955           3 : static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
   26956             : #if PY_VERSION_HEX >= 0x030C00A6
   26957           3 :     PyObject *tmp_value;
   26958           3 :     assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
   26959           3 :     if (value) {
   26960             :         #if CYTHON_COMPILING_IN_CPYTHON
   26961           0 :         if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
   26962             :         #endif
   26963           0 :             PyException_SetTraceback(value, tb);
   26964             :     }
   26965           3 :     tmp_value = tstate->current_exception;
   26966           3 :     tstate->current_exception = value;
   26967           3 :     Py_XDECREF(tmp_value);
   26968           3 :     Py_XDECREF(type);
   26969           3 :     Py_XDECREF(tb);
   26970             : #else
   26971             :     PyObject *tmp_type, *tmp_value, *tmp_tb;
   26972             :     tmp_type = tstate->curexc_type;
   26973             :     tmp_value = tstate->curexc_value;
   26974             :     tmp_tb = tstate->curexc_traceback;
   26975             :     tstate->curexc_type = type;
   26976             :     tstate->curexc_value = value;
   26977             :     tstate->curexc_traceback = tb;
   26978             :     Py_XDECREF(tmp_type);
   26979             :     Py_XDECREF(tmp_value);
   26980             :     Py_XDECREF(tmp_tb);
   26981             : #endif
   26982           3 : }
   26983           0 : static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
   26984             : #if PY_VERSION_HEX >= 0x030C00A6
   26985           0 :     PyObject* exc_value;
   26986           0 :     exc_value = tstate->current_exception;
   26987           0 :     tstate->current_exception = 0;
   26988           0 :     *value = exc_value;
   26989           0 :     *type = NULL;
   26990           0 :     *tb = NULL;
   26991           0 :     if (exc_value) {
   26992           0 :         *type = (PyObject*) Py_TYPE(exc_value);
   26993           0 :         Py_INCREF(*type);
   26994             :         #if CYTHON_COMPILING_IN_CPYTHON
   26995           0 :         *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
   26996           0 :         Py_XINCREF(*tb);
   26997             :         #else
   26998             :         *tb = PyException_GetTraceback(exc_value);
   26999             :         #endif
   27000             :     }
   27001             : #else
   27002             :     *type = tstate->curexc_type;
   27003             :     *value = tstate->curexc_value;
   27004             :     *tb = tstate->curexc_traceback;
   27005             :     tstate->curexc_type = 0;
   27006             :     tstate->curexc_value = 0;
   27007             :     tstate->curexc_traceback = 0;
   27008             : #endif
   27009           0 : }
   27010             : #endif
   27011             : 
   27012             : /* PyObjectGetAttrStr */
   27013             : #if CYTHON_USE_TYPE_SLOTS
   27014         740 : static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
   27015         740 :     PyTypeObject* tp = Py_TYPE(obj);
   27016         740 :     if (likely(tp->tp_getattro))
   27017         740 :         return tp->tp_getattro(obj, attr_name);
   27018             : #if PY_MAJOR_VERSION < 3
   27019             :     if (likely(tp->tp_getattr))
   27020             :         return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
   27021             : #endif
   27022           0 :     return PyObject_GetAttr(obj, attr_name);
   27023             : }
   27024             : #endif
   27025             : 
   27026             : /* PyObjectGetAttrStrNoError */
   27027             : #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1
   27028           3 : static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
   27029           3 :     __Pyx_PyThreadState_declare
   27030           3 :     __Pyx_PyThreadState_assign
   27031           3 :     if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
   27032           3 :         __Pyx_PyErr_Clear();
   27033           3 : }
   27034             : #endif
   27035          25 : static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
   27036          25 :     PyObject *result;
   27037             : #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
   27038             :     (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
   27039             :     return result;
   27040             : #else
   27041             : #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
   27042          25 :     PyTypeObject* tp = Py_TYPE(obj);
   27043          25 :     if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
   27044           2 :         return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
   27045             :     }
   27046             : #endif
   27047          23 :     result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
   27048          23 :     if (unlikely(!result)) {
   27049           3 :         __Pyx_PyObject_GetAttrStr_ClearAttributeError();
   27050             :     }
   27051             :     return result;
   27052             : #endif
   27053             : }
   27054             : 
   27055             : /* GetBuiltinName */
   27056          11 : static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
   27057          11 :     PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_b, name);
   27058          11 :     if (unlikely(!result) && !PyErr_Occurred()) {
   27059           0 :         PyErr_Format(PyExc_NameError,
   27060             : #if PY_MAJOR_VERSION >= 3
   27061             :             "name '%U' is not defined", name);
   27062             : #else
   27063             :             "name '%.200s' is not defined", PyString_AS_STRING(name));
   27064             : #endif
   27065             :     }
   27066          11 :     return result;
   27067             : }
   27068             : 
   27069             : /* TupleAndListFromArray */
   27070             : #if CYTHON_COMPILING_IN_CPYTHON
   27071             : static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
   27072             :     PyObject *v;
   27073             :     Py_ssize_t i;
   27074             :     for (i = 0; i < length; i++) {
   27075             :         v = dest[i] = src[i];
   27076             :         Py_INCREF(v);
   27077             :     }
   27078             : }
   27079             : static CYTHON_INLINE PyObject *
   27080             : __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
   27081             : {
   27082             :     PyObject *res;
   27083             :     if (n <= 0) {
   27084             :         Py_INCREF(__pyx_empty_tuple);
   27085             :         return __pyx_empty_tuple;
   27086             :     }
   27087             :     res = PyTuple_New(n);
   27088             :     if (unlikely(res == NULL)) return NULL;
   27089             :     __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n);
   27090             :     return res;
   27091             : }
   27092             : static CYTHON_INLINE PyObject *
   27093             : __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n)
   27094             : {
   27095             :     PyObject *res;
   27096             :     if (n <= 0) {
   27097             :         return PyList_New(0);
   27098             :     }
   27099             :     res = PyList_New(n);
   27100             :     if (unlikely(res == NULL)) return NULL;
   27101             :     __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n);
   27102             :     return res;
   27103             : }
   27104             : #endif
   27105             : 
   27106             : /* BytesEquals */
   27107             : static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
   27108             : #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
   27109             :     return PyObject_RichCompareBool(s1, s2, equals);
   27110             : #else
   27111             :     if (s1 == s2) {
   27112             :         return (equals == Py_EQ);
   27113             :     } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
   27114             :         const char *ps1, *ps2;
   27115             :         Py_ssize_t length = PyBytes_GET_SIZE(s1);
   27116             :         if (length != PyBytes_GET_SIZE(s2))
   27117             :             return (equals == Py_NE);
   27118             :         ps1 = PyBytes_AS_STRING(s1);
   27119             :         ps2 = PyBytes_AS_STRING(s2);
   27120             :         if (ps1[0] != ps2[0]) {
   27121             :             return (equals == Py_NE);
   27122             :         } else if (length == 1) {
   27123             :             return (equals == Py_EQ);
   27124             :         } else {
   27125             :             int result;
   27126             : #if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
   27127             :             Py_hash_t hash1, hash2;
   27128             :             hash1 = ((PyBytesObject*)s1)->ob_shash;
   27129             :             hash2 = ((PyBytesObject*)s2)->ob_shash;
   27130             :             if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
   27131             :                 return (equals == Py_NE);
   27132             :             }
   27133             : #endif
   27134             :             result = memcmp(ps1, ps2, (size_t)length);
   27135             :             return (equals == Py_EQ) ? (result == 0) : (result != 0);
   27136             :         }
   27137             :     } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
   27138             :         return (equals == Py_NE);
   27139             :     } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
   27140             :         return (equals == Py_NE);
   27141             :     } else {
   27142             :         int result;
   27143             :         PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
   27144             :         if (!py_result)
   27145             :             return -1;
   27146             :         result = __Pyx_PyObject_IsTrue(py_result);
   27147             :         Py_DECREF(py_result);
   27148             :         return result;
   27149             :     }
   27150             : #endif
   27151             : }
   27152             : 
   27153             : /* UnicodeEquals */
   27154         350 : static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
   27155             : #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
   27156             :     return PyObject_RichCompareBool(s1, s2, equals);
   27157             : #else
   27158             : #if PY_MAJOR_VERSION < 3
   27159             :     PyObject* owned_ref = NULL;
   27160             : #endif
   27161         350 :     int s1_is_unicode, s2_is_unicode;
   27162         350 :     if (s1 == s2) {
   27163          46 :         goto return_eq;
   27164             :     }
   27165         304 :     s1_is_unicode = PyUnicode_CheckExact(s1);
   27166         304 :     s2_is_unicode = PyUnicode_CheckExact(s2);
   27167             : #if PY_MAJOR_VERSION < 3
   27168             :     if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
   27169             :         owned_ref = PyUnicode_FromObject(s2);
   27170             :         if (unlikely(!owned_ref))
   27171             :             return -1;
   27172             :         s2 = owned_ref;
   27173             :         s2_is_unicode = 1;
   27174             :     } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
   27175             :         owned_ref = PyUnicode_FromObject(s1);
   27176             :         if (unlikely(!owned_ref))
   27177             :             return -1;
   27178             :         s1 = owned_ref;
   27179             :         s1_is_unicode = 1;
   27180             :     } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
   27181             :         return __Pyx_PyBytes_Equals(s1, s2, equals);
   27182             :     }
   27183             : #endif
   27184         304 :     if (s1_is_unicode & s2_is_unicode) {
   27185         304 :         Py_ssize_t length;
   27186         304 :         int kind;
   27187         304 :         void *data1, *data2;
   27188         304 :         if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
   27189             :             return -1;
   27190         304 :         length = __Pyx_PyUnicode_GET_LENGTH(s1);
   27191         304 :         if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
   27192           0 :             goto return_ne;
   27193             :         }
   27194             : #if CYTHON_USE_UNICODE_INTERNALS
   27195             :         {
   27196         304 :             Py_hash_t hash1, hash2;
   27197             :         #if CYTHON_PEP393_ENABLED
   27198         304 :             hash1 = ((PyASCIIObject*)s1)->hash;
   27199         304 :             hash2 = ((PyASCIIObject*)s2)->hash;
   27200             :         #else
   27201             :             hash1 = ((PyUnicodeObject*)s1)->hash;
   27202             :             hash2 = ((PyUnicodeObject*)s2)->hash;
   27203             :         #endif
   27204         304 :             if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
   27205         209 :                 goto return_ne;
   27206             :             }
   27207             :         }
   27208             : #endif
   27209          95 :         kind = __Pyx_PyUnicode_KIND(s1);
   27210          95 :         if (kind != __Pyx_PyUnicode_KIND(s2)) {
   27211           0 :             goto return_ne;
   27212             :         }
   27213          95 :         data1 = __Pyx_PyUnicode_DATA(s1);
   27214          95 :         data2 = __Pyx_PyUnicode_DATA(s2);
   27215         285 :         if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
   27216           0 :             goto return_ne;
   27217          95 :         } else if (length == 1) {
   27218          95 :             goto return_eq;
   27219             :         } else {
   27220           0 :             int result = memcmp(data1, data2, (size_t)(length * kind));
   27221             :             #if PY_MAJOR_VERSION < 3
   27222             :             Py_XDECREF(owned_ref);
   27223             :             #endif
   27224           0 :             return (equals == Py_EQ) ? (result == 0) : (result != 0);
   27225             :         }
   27226           0 :     } else if ((s1 == Py_None) & s2_is_unicode) {
   27227           0 :         goto return_ne;
   27228           0 :     } else if ((s2 == Py_None) & s1_is_unicode) {
   27229           0 :         goto return_ne;
   27230             :     } else {
   27231           0 :         int result;
   27232           0 :         PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
   27233             :         #if PY_MAJOR_VERSION < 3
   27234             :         Py_XDECREF(owned_ref);
   27235             :         #endif
   27236           0 :         if (!py_result)
   27237             :             return -1;
   27238           0 :         result = __Pyx_PyObject_IsTrue(py_result);
   27239           0 :         Py_DECREF(py_result);
   27240           0 :         return result;
   27241             :     }
   27242         141 : return_eq:
   27243             :     #if PY_MAJOR_VERSION < 3
   27244             :     Py_XDECREF(owned_ref);
   27245             :     #endif
   27246         141 :     return (equals == Py_EQ);
   27247         209 : return_ne:
   27248             :     #if PY_MAJOR_VERSION < 3
   27249             :     Py_XDECREF(owned_ref);
   27250             :     #endif
   27251         209 :     return (equals == Py_NE);
   27252             : #endif
   27253             : }
   27254             : 
   27255             : /* fastcall */
   27256             : #if CYTHON_METH_FASTCALL
   27257           0 : static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s)
   27258             : {
   27259           0 :     Py_ssize_t i, n = PyTuple_GET_SIZE(kwnames);
   27260           0 :     for (i = 0; i < n; i++)
   27261             :     {
   27262           0 :         if (s == PyTuple_GET_ITEM(kwnames, i)) return kwvalues[i];
   27263             :     }
   27264           0 :     for (i = 0; i < n; i++)
   27265             :     {
   27266           0 :         int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), Py_EQ);
   27267           0 :         if (unlikely(eq != 0)) {
   27268           0 :             if (unlikely(eq < 0)) return NULL;
   27269           0 :             return kwvalues[i];
   27270             :         }
   27271             :     }
   27272             :     return NULL;
   27273             : }
   27274             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
   27275             : CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) {
   27276             :     Py_ssize_t i, nkwargs = PyTuple_GET_SIZE(kwnames);
   27277             :     PyObject *dict;
   27278             :     dict = PyDict_New();
   27279             :     if (unlikely(!dict))
   27280             :         return NULL;
   27281             :     for (i=0; i<nkwargs; i++) {
   27282             :         PyObject *key = PyTuple_GET_ITEM(kwnames, i);
   27283             :         if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0))
   27284             :             goto bad;
   27285             :     }
   27286             :     return dict;
   27287             : bad:
   27288             :     Py_DECREF(dict);
   27289             :     return NULL;
   27290             : }
   27291             : #endif
   27292             : #endif
   27293             : 
   27294             : /* RaiseArgTupleInvalid */
   27295           0 : static void __Pyx_RaiseArgtupleInvalid(
   27296             :     const char* func_name,
   27297             :     int exact,
   27298             :     Py_ssize_t num_min,
   27299             :     Py_ssize_t num_max,
   27300             :     Py_ssize_t num_found)
   27301             : {
   27302           0 :     Py_ssize_t num_expected;
   27303           0 :     const char *more_or_less;
   27304           0 :     if (num_found < num_min) {
   27305             :         num_expected = num_min;
   27306             :         more_or_less = "at least";
   27307             :     } else {
   27308           0 :         num_expected = num_max;
   27309           0 :         more_or_less = "at most";
   27310             :     }
   27311           0 :     if (exact) {
   27312           0 :         more_or_less = "exactly";
   27313             :     }
   27314           0 :     PyErr_Format(PyExc_TypeError,
   27315             :                  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
   27316             :                  func_name, more_or_less, num_expected,
   27317             :                  (num_expected == 1) ? "" : "s", num_found);
   27318           0 : }
   27319             : 
   27320             : /* RaiseDoubleKeywords */
   27321           0 : static void __Pyx_RaiseDoubleKeywordsError(
   27322             :     const char* func_name,
   27323             :     PyObject* kw_name)
   27324             : {
   27325           0 :     PyErr_Format(PyExc_TypeError,
   27326             :         #if PY_MAJOR_VERSION >= 3
   27327             :         "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
   27328             :         #else
   27329             :         "%s() got multiple values for keyword argument '%s'", func_name,
   27330             :         PyString_AsString(kw_name));
   27331             :         #endif
   27332             : }
   27333             : 
   27334             : /* ParseKeywords */
   27335           0 : static int __Pyx_ParseOptionalKeywords(
   27336             :     PyObject *kwds,
   27337             :     PyObject *const *kwvalues,
   27338             :     PyObject **argnames[],
   27339             :     PyObject *kwds2,
   27340             :     PyObject *values[],
   27341             :     Py_ssize_t num_pos_args,
   27342             :     const char* function_name)
   27343             : {
   27344           0 :     PyObject *key = 0, *value = 0;
   27345           0 :     Py_ssize_t pos = 0;
   27346           0 :     PyObject*** name;
   27347           0 :     PyObject*** first_kw_arg = argnames + num_pos_args;
   27348           0 :     int kwds_is_tuple = CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds));
   27349           0 :     while (1) {
   27350           0 :         Py_XDECREF(key); key = NULL;
   27351           0 :         Py_XDECREF(value); value = NULL;
   27352           0 :         if (kwds_is_tuple) {
   27353           0 :             Py_ssize_t size;
   27354             : #if CYTHON_ASSUME_SAFE_MACROS
   27355           0 :             size = PyTuple_GET_SIZE(kwds);
   27356             : #else
   27357             :             size = PyTuple_Size(kwds);
   27358             :             if (size < 0) goto bad;
   27359             : #endif
   27360           0 :             if (pos >= size) break;
   27361             : #if CYTHON_AVOID_BORROWED_REFS
   27362             :             key = __Pyx_PySequence_ITEM(kwds, pos);
   27363             :             if (!key) goto bad;
   27364             : #elif CYTHON_ASSUME_SAFE_MACROS
   27365           0 :             key = PyTuple_GET_ITEM(kwds, pos);
   27366             : #else
   27367             :             key = PyTuple_GetItem(kwds, pos);
   27368             :             if (!key) goto bad;
   27369             : #endif
   27370           0 :             value = kwvalues[pos];
   27371           0 :             pos++;
   27372             :         }
   27373             :         else
   27374             :         {
   27375           0 :             if (!PyDict_Next(kwds, &pos, &key, &value)) break;
   27376             : #if CYTHON_AVOID_BORROWED_REFS
   27377             :             Py_INCREF(key);
   27378             : #endif
   27379             :         }
   27380           0 :         name = first_kw_arg;
   27381           0 :         while (*name && (**name != key)) name++;
   27382           0 :         if (*name) {
   27383           0 :             values[name-argnames] = value;
   27384             : #if CYTHON_AVOID_BORROWED_REFS
   27385             :             Py_INCREF(value);
   27386             :             Py_DECREF(key);
   27387             : #endif
   27388           0 :             key = NULL;
   27389           0 :             value = NULL;
   27390           0 :             continue;
   27391             :         }
   27392             : #if !CYTHON_AVOID_BORROWED_REFS
   27393           0 :         Py_INCREF(key);
   27394             : #endif
   27395           0 :         Py_INCREF(value);
   27396           0 :         name = first_kw_arg;
   27397             :         #if PY_MAJOR_VERSION < 3
   27398             :         if (likely(PyString_Check(key))) {
   27399             :             while (*name) {
   27400             :                 if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
   27401             :                         && _PyString_Eq(**name, key)) {
   27402             :                     values[name-argnames] = value;
   27403             : #if CYTHON_AVOID_BORROWED_REFS
   27404             :                     value = NULL;
   27405             : #endif
   27406             :                     break;
   27407             :                 }
   27408             :                 name++;
   27409             :             }
   27410             :             if (*name) continue;
   27411             :             else {
   27412             :                 PyObject*** argname = argnames;
   27413             :                 while (argname != first_kw_arg) {
   27414             :                     if ((**argname == key) || (
   27415             :                             (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
   27416             :                              && _PyString_Eq(**argname, key))) {
   27417             :                         goto arg_passed_twice;
   27418             :                     }
   27419             :                     argname++;
   27420             :                 }
   27421             :             }
   27422             :         } else
   27423             :         #endif
   27424           0 :         if (likely(PyUnicode_Check(key))) {
   27425           0 :             while (*name) {
   27426           0 :                 int cmp = (
   27427             :                 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
   27428           0 :                     (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
   27429             :                 #endif
   27430           0 :                     PyUnicode_Compare(**name, key)
   27431             :                 );
   27432           0 :                 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
   27433           0 :                 if (cmp == 0) {
   27434           0 :                     values[name-argnames] = value;
   27435             : #if CYTHON_AVOID_BORROWED_REFS
   27436             :                     value = NULL;
   27437             : #endif
   27438           0 :                     break;
   27439             :                 }
   27440           0 :                 name++;
   27441             :             }
   27442           0 :             if (*name) continue;
   27443             :             else {
   27444             :                 PyObject*** argname = argnames;
   27445           0 :                 while (argname != first_kw_arg) {
   27446           0 :                     int cmp = (**argname == key) ? 0 :
   27447             :                     #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
   27448           0 :                         (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
   27449             :                     #endif
   27450           0 :                         PyUnicode_Compare(**argname, key);
   27451           0 :                     if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
   27452           0 :                     if (cmp == 0) goto arg_passed_twice;
   27453           0 :                     argname++;
   27454             :                 }
   27455             :             }
   27456             :         } else
   27457           0 :             goto invalid_keyword_type;
   27458           0 :         if (kwds2) {
   27459           0 :             if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
   27460             :         } else {
   27461           0 :             goto invalid_keyword;
   27462             :         }
   27463             :     }
   27464           0 :     Py_XDECREF(key);
   27465           0 :     Py_XDECREF(value);
   27466           0 :     return 0;
   27467           0 : arg_passed_twice:
   27468           0 :     __Pyx_RaiseDoubleKeywordsError(function_name, key);
   27469           0 :     goto bad;
   27470           0 : invalid_keyword_type:
   27471           0 :     PyErr_Format(PyExc_TypeError,
   27472             :         "%.200s() keywords must be strings", function_name);
   27473           0 :     goto bad;
   27474           0 : invalid_keyword:
   27475             :     #if PY_MAJOR_VERSION < 3
   27476             :     PyErr_Format(PyExc_TypeError,
   27477             :         "%.200s() got an unexpected keyword argument '%.200s'",
   27478             :         function_name, PyString_AsString(key));
   27479             :     #else
   27480           0 :     PyErr_Format(PyExc_TypeError,
   27481             :         "%s() got an unexpected keyword argument '%U'",
   27482             :         function_name, key);
   27483             :     #endif
   27484           0 : bad:
   27485           0 :     Py_XDECREF(key);
   27486           0 :     Py_XDECREF(value);
   27487           0 :     return -1;
   27488             : }
   27489             : 
   27490             : /* ArgTypeTest */
   27491           0 : static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
   27492             : {
   27493           0 :     __Pyx_TypeName type_name;
   27494           0 :     __Pyx_TypeName obj_type_name;
   27495           0 :     if (unlikely(!type)) {
   27496           0 :         PyErr_SetString(PyExc_SystemError, "Missing type object");
   27497           0 :         return 0;
   27498             :     }
   27499           0 :     else if (exact) {
   27500             :         #if PY_MAJOR_VERSION == 2
   27501             :         if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
   27502             :         #endif
   27503             :     }
   27504             :     else {
   27505           0 :         if (likely(__Pyx_TypeCheck(obj, type))) return 1;
   27506             :     }
   27507           0 :     type_name = __Pyx_PyType_GetName(type);
   27508           0 :     obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
   27509           0 :     PyErr_Format(PyExc_TypeError,
   27510             :         "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME
   27511             :         ", got " __Pyx_FMT_TYPENAME ")", name, type_name, obj_type_name);
   27512           0 :     __Pyx_DECREF_TypeName(type_name);
   27513           0 :     __Pyx_DECREF_TypeName(obj_type_name);
   27514           0 :     return 0;
   27515             : }
   27516             : 
   27517             : /* RaiseException */
   27518             : #if PY_MAJOR_VERSION < 3
   27519             : static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
   27520             :     __Pyx_PyThreadState_declare
   27521             :     CYTHON_UNUSED_VAR(cause);
   27522             :     Py_XINCREF(type);
   27523             :     if (!value || value == Py_None)
   27524             :         value = NULL;
   27525             :     else
   27526             :         Py_INCREF(value);
   27527             :     if (!tb || tb == Py_None)
   27528             :         tb = NULL;
   27529             :     else {
   27530             :         Py_INCREF(tb);
   27531             :         if (!PyTraceBack_Check(tb)) {
   27532             :             PyErr_SetString(PyExc_TypeError,
   27533             :                 "raise: arg 3 must be a traceback or None");
   27534             :             goto raise_error;
   27535             :         }
   27536             :     }
   27537             :     if (PyType_Check(type)) {
   27538             : #if CYTHON_COMPILING_IN_PYPY
   27539             :         if (!value) {
   27540             :             Py_INCREF(Py_None);
   27541             :             value = Py_None;
   27542             :         }
   27543             : #endif
   27544             :         PyErr_NormalizeException(&type, &value, &tb);
   27545             :     } else {
   27546             :         if (value) {
   27547             :             PyErr_SetString(PyExc_TypeError,
   27548             :                 "instance exception may not have a separate value");
   27549             :             goto raise_error;
   27550             :         }
   27551             :         value = type;
   27552             :         type = (PyObject*) Py_TYPE(type);
   27553             :         Py_INCREF(type);
   27554             :         if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
   27555             :             PyErr_SetString(PyExc_TypeError,
   27556             :                 "raise: exception class must be a subclass of BaseException");
   27557             :             goto raise_error;
   27558             :         }
   27559             :     }
   27560             :     __Pyx_PyThreadState_assign
   27561             :     __Pyx_ErrRestore(type, value, tb);
   27562             :     return;
   27563             : raise_error:
   27564             :     Py_XDECREF(value);
   27565             :     Py_XDECREF(type);
   27566             :     Py_XDECREF(tb);
   27567             :     return;
   27568             : }
   27569             : #else
   27570           0 : static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
   27571           0 :     PyObject* owned_instance = NULL;
   27572           0 :     if (tb == Py_None) {
   27573             :         tb = 0;
   27574           0 :     } else if (tb && !PyTraceBack_Check(tb)) {
   27575           0 :         PyErr_SetString(PyExc_TypeError,
   27576             :             "raise: arg 3 must be a traceback or None");
   27577           0 :         goto bad;
   27578             :     }
   27579           0 :     if (value == Py_None)
   27580           0 :         value = 0;
   27581           0 :     if (PyExceptionInstance_Check(type)) {
   27582           0 :         if (value) {
   27583           0 :             PyErr_SetString(PyExc_TypeError,
   27584             :                 "instance exception may not have a separate value");
   27585           0 :             goto bad;
   27586             :         }
   27587             :         value = type;
   27588             :         type = (PyObject*) Py_TYPE(value);
   27589           0 :     } else if (PyExceptionClass_Check(type)) {
   27590           0 :         PyObject *instance_class = NULL;
   27591           0 :         if (value && PyExceptionInstance_Check(value)) {
   27592           0 :             instance_class = (PyObject*) Py_TYPE(value);
   27593           0 :             if (instance_class != type) {
   27594           0 :                 int is_subclass = PyObject_IsSubclass(instance_class, type);
   27595           0 :                 if (!is_subclass) {
   27596             :                     instance_class = NULL;
   27597           0 :                 } else if (unlikely(is_subclass == -1)) {
   27598           0 :                     goto bad;
   27599             :                 } else {
   27600             :                     type = instance_class;
   27601             :                 }
   27602             :             }
   27603             :         }
   27604             :         if (!instance_class) {
   27605           0 :             PyObject *args;
   27606           0 :             if (!value)
   27607           0 :                 args = PyTuple_New(0);
   27608           0 :             else if (PyTuple_Check(value)) {
   27609           0 :                 Py_INCREF(value);
   27610           0 :                 args = value;
   27611             :             } else
   27612           0 :                 args = PyTuple_Pack(1, value);
   27613           0 :             if (!args)
   27614           0 :                 goto bad;
   27615           0 :             owned_instance = PyObject_Call(type, args, NULL);
   27616           0 :             Py_DECREF(args);
   27617           0 :             if (!owned_instance)
   27618           0 :                 goto bad;
   27619           0 :             value = owned_instance;
   27620           0 :             if (!PyExceptionInstance_Check(value)) {
   27621           0 :                 PyErr_Format(PyExc_TypeError,
   27622             :                              "calling %R should have returned an instance of "
   27623             :                              "BaseException, not %R",
   27624             :                              type, Py_TYPE(value));
   27625           0 :                 goto bad;
   27626             :             }
   27627             :         }
   27628             :     } else {
   27629           0 :         PyErr_SetString(PyExc_TypeError,
   27630             :             "raise: exception class must be a subclass of BaseException");
   27631           0 :         goto bad;
   27632             :     }
   27633           0 :     if (cause) {
   27634           0 :         PyObject *fixed_cause;
   27635           0 :         if (cause == Py_None) {
   27636             :             fixed_cause = NULL;
   27637           0 :         } else if (PyExceptionClass_Check(cause)) {
   27638           0 :             fixed_cause = PyObject_CallObject(cause, NULL);
   27639           0 :             if (fixed_cause == NULL)
   27640           0 :                 goto bad;
   27641           0 :         } else if (PyExceptionInstance_Check(cause)) {
   27642           0 :             fixed_cause = cause;
   27643           0 :             Py_INCREF(fixed_cause);
   27644             :         } else {
   27645           0 :             PyErr_SetString(PyExc_TypeError,
   27646             :                             "exception causes must derive from "
   27647             :                             "BaseException");
   27648           0 :             goto bad;
   27649             :         }
   27650           0 :         PyException_SetCause(value, fixed_cause);
   27651             :     }
   27652           0 :     PyErr_SetObject(type, value);
   27653           0 :     if (tb) {
   27654             :       #if PY_VERSION_HEX >= 0x030C00A6
   27655           0 :         PyException_SetTraceback(value, tb);
   27656             :       #elif CYTHON_FAST_THREAD_STATE
   27657             :         PyThreadState *tstate = __Pyx_PyThreadState_Current;
   27658             :         PyObject* tmp_tb = tstate->curexc_traceback;
   27659             :         if (tb != tmp_tb) {
   27660             :             Py_INCREF(tb);
   27661             :             tstate->curexc_traceback = tb;
   27662             :             Py_XDECREF(tmp_tb);
   27663             :         }
   27664             : #else
   27665             :         PyObject *tmp_type, *tmp_value, *tmp_tb;
   27666             :         PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
   27667             :         Py_INCREF(tb);
   27668             :         PyErr_Restore(tmp_type, tmp_value, tb);
   27669             :         Py_XDECREF(tmp_tb);
   27670             : #endif
   27671             :     }
   27672           0 : bad:
   27673           0 :     Py_XDECREF(owned_instance);
   27674           0 :     return;
   27675             : }
   27676             : #endif
   27677             : 
   27678             : /* PyFunctionFastCall */
   27679             : #if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL
   27680             : static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
   27681             :                                                PyObject *globals) {
   27682             :     PyFrameObject *f;
   27683             :     PyThreadState *tstate = __Pyx_PyThreadState_Current;
   27684             :     PyObject **fastlocals;
   27685             :     Py_ssize_t i;
   27686             :     PyObject *result;
   27687             :     assert(globals != NULL);
   27688             :     /* XXX Perhaps we should create a specialized
   27689             :        PyFrame_New() that doesn't take locals, but does
   27690             :        take builtins without sanity checking them.
   27691             :        */
   27692             :     assert(tstate != NULL);
   27693             :     f = PyFrame_New(tstate, co, globals, NULL);
   27694             :     if (f == NULL) {
   27695             :         return NULL;
   27696             :     }
   27697             :     fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
   27698             :     for (i = 0; i < na; i++) {
   27699             :         Py_INCREF(*args);
   27700             :         fastlocals[i] = *args++;
   27701             :     }
   27702             :     result = PyEval_EvalFrameEx(f,0);
   27703             :     ++tstate->recursion_depth;
   27704             :     Py_DECREF(f);
   27705             :     --tstate->recursion_depth;
   27706             :     return result;
   27707             : }
   27708             : static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
   27709             :     PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
   27710             :     PyObject *globals = PyFunction_GET_GLOBALS(func);
   27711             :     PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
   27712             :     PyObject *closure;
   27713             : #if PY_MAJOR_VERSION >= 3
   27714             :     PyObject *kwdefs;
   27715             : #endif
   27716             :     PyObject *kwtuple, **k;
   27717             :     PyObject **d;
   27718             :     Py_ssize_t nd;
   27719             :     Py_ssize_t nk;
   27720             :     PyObject *result;
   27721             :     assert(kwargs == NULL || PyDict_Check(kwargs));
   27722             :     nk = kwargs ? PyDict_Size(kwargs) : 0;
   27723             :     #if PY_MAJOR_VERSION < 3
   27724             :     if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) {
   27725             :         return NULL;
   27726             :     }
   27727             :     #else
   27728             :     if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) {
   27729             :         return NULL;
   27730             :     }
   27731             :     #endif
   27732             :     if (
   27733             : #if PY_MAJOR_VERSION >= 3
   27734             :             co->co_kwonlyargcount == 0 &&
   27735             : #endif
   27736             :             likely(kwargs == NULL || nk == 0) &&
   27737             :             co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
   27738             :         if (argdefs == NULL && co->co_argcount == nargs) {
   27739             :             result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
   27740             :             goto done;
   27741             :         }
   27742             :         else if (nargs == 0 && argdefs != NULL
   27743             :                  && co->co_argcount == Py_SIZE(argdefs)) {
   27744             :             /* function called with no arguments, but all parameters have
   27745             :                a default value: use default values as arguments .*/
   27746             :             args = &PyTuple_GET_ITEM(argdefs, 0);
   27747             :             result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
   27748             :             goto done;
   27749             :         }
   27750             :     }
   27751             :     if (kwargs != NULL) {
   27752             :         Py_ssize_t pos, i;
   27753             :         kwtuple = PyTuple_New(2 * nk);
   27754             :         if (kwtuple == NULL) {
   27755             :             result = NULL;
   27756             :             goto done;
   27757             :         }
   27758             :         k = &PyTuple_GET_ITEM(kwtuple, 0);
   27759             :         pos = i = 0;
   27760             :         while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
   27761             :             Py_INCREF(k[i]);
   27762             :             Py_INCREF(k[i+1]);
   27763             :             i += 2;
   27764             :         }
   27765             :         nk = i / 2;
   27766             :     }
   27767             :     else {
   27768             :         kwtuple = NULL;
   27769             :         k = NULL;
   27770             :     }
   27771             :     closure = PyFunction_GET_CLOSURE(func);
   27772             : #if PY_MAJOR_VERSION >= 3
   27773             :     kwdefs = PyFunction_GET_KW_DEFAULTS(func);
   27774             : #endif
   27775             :     if (argdefs != NULL) {
   27776             :         d = &PyTuple_GET_ITEM(argdefs, 0);
   27777             :         nd = Py_SIZE(argdefs);
   27778             :     }
   27779             :     else {
   27780             :         d = NULL;
   27781             :         nd = 0;
   27782             :     }
   27783             : #if PY_MAJOR_VERSION >= 3
   27784             :     result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
   27785             :                                args, (int)nargs,
   27786             :                                k, (int)nk,
   27787             :                                d, (int)nd, kwdefs, closure);
   27788             : #else
   27789             :     result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
   27790             :                                args, (int)nargs,
   27791             :                                k, (int)nk,
   27792             :                                d, (int)nd, closure);
   27793             : #endif
   27794             :     Py_XDECREF(kwtuple);
   27795             : done:
   27796             :     Py_LeaveRecursiveCall();
   27797             :     return result;
   27798             : }
   27799             : #endif
   27800             : 
   27801             : /* PyObjectCall */
   27802             : #if CYTHON_COMPILING_IN_CPYTHON
   27803         148 : static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
   27804         148 :     PyObject *result;
   27805         148 :     ternaryfunc call = Py_TYPE(func)->tp_call;
   27806         148 :     if (unlikely(!call))
   27807           0 :         return PyObject_Call(func, arg, kw);
   27808             :     #if PY_MAJOR_VERSION < 3
   27809             :     if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
   27810             :         return NULL;
   27811             :     #else
   27812         148 :     if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
   27813             :         return NULL;
   27814             :     #endif
   27815         148 :     result = (*call)(func, arg, kw);
   27816         148 :     Py_LeaveRecursiveCall();
   27817         148 :     if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
   27818           0 :         PyErr_SetString(
   27819             :             PyExc_SystemError,
   27820             :             "NULL result without error in PyObject_Call");
   27821             :     }
   27822             :     return result;
   27823             : }
   27824             : #endif
   27825             : 
   27826             : /* PyObjectCallMethO */
   27827             : #if CYTHON_COMPILING_IN_CPYTHON
   27828           0 : static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
   27829           0 :     PyObject *self, *result;
   27830           0 :     PyCFunction cfunc;
   27831           0 :     cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
   27832           0 :     self = __Pyx_CyOrPyCFunction_GET_SELF(func);
   27833             :     #if PY_MAJOR_VERSION < 3
   27834             :     if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
   27835             :         return NULL;
   27836             :     #else
   27837           0 :     if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
   27838             :         return NULL;
   27839             :     #endif
   27840           0 :     result = cfunc(self, arg);
   27841           0 :     Py_LeaveRecursiveCall();
   27842           0 :     if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
   27843           0 :         PyErr_SetString(
   27844             :             PyExc_SystemError,
   27845             :             "NULL result without error in PyObject_Call");
   27846             :     }
   27847             :     return result;
   27848             : }
   27849             : #endif
   27850             : 
   27851             : /* PyObjectFastCall */
   27852             : #if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API
   27853             : static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs) {
   27854             :     PyObject *argstuple;
   27855             :     PyObject *result = 0;
   27856             :     size_t i;
   27857             :     argstuple = PyTuple_New((Py_ssize_t)nargs);
   27858             :     if (unlikely(!argstuple)) return NULL;
   27859             :     for (i = 0; i < nargs; i++) {
   27860             :         Py_INCREF(args[i]);
   27861             :         if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) < 0) goto bad;
   27862             :     }
   27863             :     result = __Pyx_PyObject_Call(func, argstuple, kwargs);
   27864             :   bad:
   27865             :     Py_DECREF(argstuple);
   27866             :     return result;
   27867             : }
   27868             : #endif
   27869           2 : static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t _nargs, PyObject *kwargs) {
   27870           2 :     Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
   27871             : #if CYTHON_COMPILING_IN_CPYTHON
   27872           2 :     if (nargs == 0 && kwargs == NULL) {
   27873           0 :         if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
   27874           0 :             return __Pyx_PyObject_CallMethO(func, NULL);
   27875             :     }
   27876           2 :     else if (nargs == 1 && kwargs == NULL) {
   27877           2 :         if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
   27878           0 :             return __Pyx_PyObject_CallMethO(func, args[0]);
   27879             :     }
   27880             : #endif
   27881             :     #if PY_VERSION_HEX < 0x030800B1
   27882             :     #if CYTHON_FAST_PYCCALL
   27883             :     if (PyCFunction_Check(func)) {
   27884             :         if (kwargs) {
   27885             :             return _PyCFunction_FastCallDict(func, args, nargs, kwargs);
   27886             :         } else {
   27887             :             return _PyCFunction_FastCallKeywords(func, args, nargs, NULL);
   27888             :         }
   27889             :     }
   27890             :     #if PY_VERSION_HEX >= 0x030700A1
   27891             :     if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) {
   27892             :         return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL);
   27893             :     }
   27894             :     #endif
   27895             :     #endif
   27896             :     #if CYTHON_FAST_PYCALL
   27897             :     if (PyFunction_Check(func)) {
   27898             :         return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs);
   27899             :     }
   27900             :     #endif
   27901             :     #endif
   27902           2 :     if (kwargs == NULL) {
   27903             :         #if CYTHON_VECTORCALL
   27904             :         #if PY_VERSION_HEX < 0x03090000
   27905             :         vectorcallfunc f = _PyVectorcall_Function(func);
   27906             :         #else
   27907           2 :         vectorcallfunc f = PyVectorcall_Function(func);
   27908             :         #endif
   27909           2 :         if (f) {
   27910           2 :             return f(func, args, (size_t)nargs, NULL);
   27911             :         }
   27912             :         #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL
   27913             :         if (__Pyx_CyFunction_CheckExact(func)) {
   27914             :             __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func);
   27915             :             if (f) return f(func, args, (size_t)nargs, NULL);
   27916             :         }
   27917             :         #endif
   27918             :     }
   27919           0 :     if (nargs == 0) {
   27920           0 :         return __Pyx_PyObject_Call(func, __pyx_empty_tuple, kwargs);
   27921             :     }
   27922             :     #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API
   27923           0 :     return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs);
   27924             :     #else
   27925             :     return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
   27926             :     #endif
   27927             : }
   27928             : 
   27929             : /* RaiseUnexpectedTypeError */
   27930             : static int
   27931           0 : __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj)
   27932             : {
   27933           0 :     __Pyx_TypeName obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
   27934           0 :     PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME,
   27935             :                  expected, obj_type_name);
   27936           0 :     __Pyx_DECREF_TypeName(obj_type_name);
   27937           0 :     return 0;
   27938             : }
   27939             : 
   27940             : /* CIntToDigits */
   27941             : static const char DIGIT_PAIRS_10[2*10*10+1] = {
   27942             :     "00010203040506070809"
   27943             :     "10111213141516171819"
   27944             :     "20212223242526272829"
   27945             :     "30313233343536373839"
   27946             :     "40414243444546474849"
   27947             :     "50515253545556575859"
   27948             :     "60616263646566676869"
   27949             :     "70717273747576777879"
   27950             :     "80818283848586878889"
   27951             :     "90919293949596979899"
   27952             : };
   27953             : static const char DIGIT_PAIRS_8[2*8*8+1] = {
   27954             :     "0001020304050607"
   27955             :     "1011121314151617"
   27956             :     "2021222324252627"
   27957             :     "3031323334353637"
   27958             :     "4041424344454647"
   27959             :     "5051525354555657"
   27960             :     "6061626364656667"
   27961             :     "7071727374757677"
   27962             : };
   27963             : static const char DIGITS_HEX[2*16+1] = {
   27964             :     "0123456789abcdef"
   27965             :     "0123456789ABCDEF"
   27966             : };
   27967             : 
   27968             : /* BuildPyUnicode */
   27969           0 : static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength,
   27970             :                                                 int prepend_sign, char padding_char) {
   27971           0 :     PyObject *uval;
   27972           0 :     Py_ssize_t uoffset = ulength - clength;
   27973             : #if CYTHON_USE_UNICODE_INTERNALS
   27974           0 :     Py_ssize_t i;
   27975             : #if CYTHON_PEP393_ENABLED
   27976           0 :     void *udata;
   27977           0 :     uval = PyUnicode_New(ulength, 127);
   27978           0 :     if (unlikely(!uval)) return NULL;
   27979           0 :     udata = PyUnicode_DATA(uval);
   27980             : #else
   27981             :     Py_UNICODE *udata;
   27982             :     uval = PyUnicode_FromUnicode(NULL, ulength);
   27983             :     if (unlikely(!uval)) return NULL;
   27984             :     udata = PyUnicode_AS_UNICODE(uval);
   27985             : #endif
   27986           0 :     if (uoffset > 0) {
   27987           0 :         i = 0;
   27988           0 :         if (prepend_sign) {
   27989           0 :             __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-');
   27990           0 :             i++;
   27991             :         }
   27992           0 :         for (; i < uoffset; i++) {
   27993           0 :             __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char);
   27994             :         }
   27995             :     }
   27996           0 :     for (i=0; i < clength; i++) {
   27997           0 :         __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]);
   27998             :     }
   27999             : #else
   28000             :     {
   28001             :         PyObject *sign = NULL, *padding = NULL;
   28002             :         uval = NULL;
   28003             :         if (uoffset > 0) {
   28004             :             prepend_sign = !!prepend_sign;
   28005             :             if (uoffset > prepend_sign) {
   28006             :                 padding = PyUnicode_FromOrdinal(padding_char);
   28007             :                 if (likely(padding) && uoffset > prepend_sign + 1) {
   28008             :                     PyObject *tmp;
   28009             :                     PyObject *repeat = PyInt_FromSsize_t(uoffset - prepend_sign);
   28010             :                     if (unlikely(!repeat)) goto done_or_error;
   28011             :                     tmp = PyNumber_Multiply(padding, repeat);
   28012             :                     Py_DECREF(repeat);
   28013             :                     Py_DECREF(padding);
   28014             :                     padding = tmp;
   28015             :                 }
   28016             :                 if (unlikely(!padding)) goto done_or_error;
   28017             :             }
   28018             :             if (prepend_sign) {
   28019             :                 sign = PyUnicode_FromOrdinal('-');
   28020             :                 if (unlikely(!sign)) goto done_or_error;
   28021             :             }
   28022             :         }
   28023             :         uval = PyUnicode_DecodeASCII(chars, clength, NULL);
   28024             :         if (likely(uval) && padding) {
   28025             :             PyObject *tmp = PyNumber_Add(padding, uval);
   28026             :             Py_DECREF(uval);
   28027             :             uval = tmp;
   28028             :         }
   28029             :         if (likely(uval) && sign) {
   28030             :             PyObject *tmp = PyNumber_Add(sign, uval);
   28031             :             Py_DECREF(uval);
   28032             :             uval = tmp;
   28033             :         }
   28034             : done_or_error:
   28035             :         Py_XDECREF(padding);
   28036             :         Py_XDECREF(sign);
   28037             :     }
   28038             : #endif
   28039             :     return uval;
   28040             : }
   28041             : 
   28042             : /* CIntToPyUnicode */
   28043           0 : static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char) {
   28044           0 :     char digits[sizeof(int)*3+2];
   28045           0 :     char *dpos, *end = digits + sizeof(int)*3+2;
   28046           0 :     const char *hex_digits = DIGITS_HEX;
   28047           0 :     Py_ssize_t length, ulength;
   28048           0 :     int prepend_sign, last_one_off;
   28049           0 :     int remaining;
   28050             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   28051             : #pragma GCC diagnostic push
   28052             : #pragma GCC diagnostic ignored "-Wconversion"
   28053             : #endif
   28054           0 :     const int neg_one = (int) -1, const_zero = (int) 0;
   28055             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   28056             : #pragma GCC diagnostic pop
   28057             : #endif
   28058           0 :     const int is_unsigned = neg_one > const_zero;
   28059           0 :     if (format_char == 'X') {
   28060           0 :         hex_digits += 16;
   28061           0 :         format_char = 'x';
   28062             :     }
   28063           0 :     remaining = value;
   28064           0 :     last_one_off = 0;
   28065           0 :     dpos = end;
   28066           0 :     do {
   28067           0 :         int digit_pos;
   28068           0 :         switch (format_char) {
   28069           0 :         case 'o':
   28070           0 :             digit_pos = abs((int)(remaining % (8*8)));
   28071           0 :             remaining = (int) (remaining / (8*8));
   28072           0 :             dpos -= 2;
   28073           0 :             memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
   28074           0 :             last_one_off = (digit_pos < 8);
   28075           0 :             break;
   28076           0 :         case 'd':
   28077           0 :             digit_pos = abs((int)(remaining % (10*10)));
   28078           0 :             remaining = (int) (remaining / (10*10));
   28079           0 :             dpos -= 2;
   28080           0 :             memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
   28081           0 :             last_one_off = (digit_pos < 10);
   28082           0 :             break;
   28083           0 :         case 'x':
   28084           0 :             *(--dpos) = hex_digits[abs((int)(remaining % 16))];
   28085           0 :             remaining = (int) (remaining / 16);
   28086           0 :             break;
   28087             :         default:
   28088             :             assert(0);
   28089             :             break;
   28090             :         }
   28091           0 :     } while (unlikely(remaining != 0));
   28092           0 :     assert(!last_one_off || *dpos == '0');
   28093           0 :     dpos += last_one_off;
   28094           0 :     length = end - dpos;
   28095           0 :     ulength = length;
   28096           0 :     prepend_sign = 0;
   28097           0 :     if (!is_unsigned && value <= neg_one) {
   28098           0 :         if (padding_char == ' ' || width <= length + 1) {
   28099           0 :             *(--dpos) = '-';
   28100           0 :             ++length;
   28101             :         } else {
   28102             :             prepend_sign = 1;
   28103             :         }
   28104           0 :         ++ulength;
   28105             :     }
   28106           0 :     if (width > ulength) {
   28107             :         ulength = width;
   28108             :     }
   28109           0 :     if (ulength == 1) {
   28110           0 :         return PyUnicode_FromOrdinal(*dpos);
   28111             :     }
   28112           0 :     return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
   28113             : }
   28114             : 
   28115             : /* CIntToPyUnicode */
   28116           0 : static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char) {
   28117           0 :     char digits[sizeof(Py_ssize_t)*3+2];
   28118           0 :     char *dpos, *end = digits + sizeof(Py_ssize_t)*3+2;
   28119           0 :     const char *hex_digits = DIGITS_HEX;
   28120           0 :     Py_ssize_t length, ulength;
   28121           0 :     int prepend_sign, last_one_off;
   28122           0 :     Py_ssize_t remaining;
   28123             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   28124             : #pragma GCC diagnostic push
   28125             : #pragma GCC diagnostic ignored "-Wconversion"
   28126             : #endif
   28127           0 :     const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0;
   28128             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   28129             : #pragma GCC diagnostic pop
   28130             : #endif
   28131           0 :     const int is_unsigned = neg_one > const_zero;
   28132           0 :     if (format_char == 'X') {
   28133           0 :         hex_digits += 16;
   28134           0 :         format_char = 'x';
   28135             :     }
   28136           0 :     remaining = value;
   28137           0 :     last_one_off = 0;
   28138           0 :     dpos = end;
   28139           0 :     do {
   28140           0 :         int digit_pos;
   28141           0 :         switch (format_char) {
   28142           0 :         case 'o':
   28143           0 :             digit_pos = abs((int)(remaining % (8*8)));
   28144           0 :             remaining = (Py_ssize_t) (remaining / (8*8));
   28145           0 :             dpos -= 2;
   28146           0 :             memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
   28147           0 :             last_one_off = (digit_pos < 8);
   28148           0 :             break;
   28149           0 :         case 'd':
   28150           0 :             digit_pos = abs((int)(remaining % (10*10)));
   28151           0 :             remaining = (Py_ssize_t) (remaining / (10*10));
   28152           0 :             dpos -= 2;
   28153           0 :             memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
   28154           0 :             last_one_off = (digit_pos < 10);
   28155           0 :             break;
   28156           0 :         case 'x':
   28157           0 :             *(--dpos) = hex_digits[abs((int)(remaining % 16))];
   28158           0 :             remaining = (Py_ssize_t) (remaining / 16);
   28159           0 :             break;
   28160             :         default:
   28161             :             assert(0);
   28162             :             break;
   28163             :         }
   28164           0 :     } while (unlikely(remaining != 0));
   28165           0 :     assert(!last_one_off || *dpos == '0');
   28166           0 :     dpos += last_one_off;
   28167           0 :     length = end - dpos;
   28168           0 :     ulength = length;
   28169           0 :     prepend_sign = 0;
   28170           0 :     if (!is_unsigned && value <= neg_one) {
   28171           0 :         if (padding_char == ' ' || width <= length + 1) {
   28172           0 :             *(--dpos) = '-';
   28173           0 :             ++length;
   28174             :         } else {
   28175             :             prepend_sign = 1;
   28176             :         }
   28177           0 :         ++ulength;
   28178             :     }
   28179           0 :     if (width > ulength) {
   28180             :         ulength = width;
   28181             :     }
   28182           0 :     if (ulength == 1) {
   28183           0 :         return PyUnicode_FromOrdinal(*dpos);
   28184             :     }
   28185           0 :     return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
   28186             : }
   28187             : 
   28188             : /* JoinPyUnicode */
   28189           0 : static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
   28190             :                                       Py_UCS4 max_char) {
   28191             : #if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   28192           0 :     PyObject *result_uval;
   28193           0 :     int result_ukind, kind_shift;
   28194           0 :     Py_ssize_t i, char_pos;
   28195           0 :     void *result_udata;
   28196           0 :     CYTHON_MAYBE_UNUSED_VAR(max_char);
   28197             : #if CYTHON_PEP393_ENABLED
   28198           0 :     result_uval = PyUnicode_New(result_ulength, max_char);
   28199           0 :     if (unlikely(!result_uval)) return NULL;
   28200           0 :     result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND;
   28201           0 :     kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1;
   28202           0 :     result_udata = PyUnicode_DATA(result_uval);
   28203             : #else
   28204             :     result_uval = PyUnicode_FromUnicode(NULL, result_ulength);
   28205             :     if (unlikely(!result_uval)) return NULL;
   28206             :     result_ukind = sizeof(Py_UNICODE);
   28207             :     kind_shift = (result_ukind == 4) ? 2 : result_ukind - 1;
   28208             :     result_udata = PyUnicode_AS_UNICODE(result_uval);
   28209             : #endif
   28210           0 :     assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0);
   28211           0 :     char_pos = 0;
   28212           0 :     for (i=0; i < value_count; i++) {
   28213           0 :         int ukind;
   28214           0 :         Py_ssize_t ulength;
   28215           0 :         void *udata;
   28216           0 :         PyObject *uval = PyTuple_GET_ITEM(value_tuple, i);
   28217           0 :         if (unlikely(__Pyx_PyUnicode_READY(uval)))
   28218             :             goto bad;
   28219           0 :         ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
   28220           0 :         if (unlikely(!ulength))
   28221           0 :             continue;
   28222           0 :         if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos))
   28223           0 :             goto overflow;
   28224           0 :         ukind = __Pyx_PyUnicode_KIND(uval);
   28225           0 :         udata = __Pyx_PyUnicode_DATA(uval);
   28226           0 :         if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) {
   28227           0 :             memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift));
   28228             :         } else {
   28229             :             #if PY_VERSION_HEX >= 0x030d0000
   28230             :             if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad;
   28231             :             #elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters)
   28232           0 :             _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
   28233             :             #else
   28234             :             Py_ssize_t j;
   28235             :             for (j=0; j < ulength; j++) {
   28236             :                 Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j);
   28237             :                 __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar);
   28238             :             }
   28239             :             #endif
   28240             :         }
   28241           0 :         char_pos += ulength;
   28242             :     }
   28243             :     return result_uval;
   28244           0 : overflow:
   28245           0 :     PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string");
   28246           0 : bad:
   28247           0 :     Py_DECREF(result_uval);
   28248             :     return NULL;
   28249             : #else
   28250             :     CYTHON_UNUSED_VAR(max_char);
   28251             :     CYTHON_UNUSED_VAR(result_ulength);
   28252             :     CYTHON_UNUSED_VAR(value_count);
   28253             :     return PyUnicode_Join(__pyx_empty_unicode, value_tuple);
   28254             : #endif
   28255             : }
   28256             : 
   28257             : /* GetAttr */
   28258           0 : static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
   28259             : #if CYTHON_USE_TYPE_SLOTS
   28260             : #if PY_MAJOR_VERSION >= 3
   28261           0 :     if (likely(PyUnicode_Check(n)))
   28262             : #else
   28263             :     if (likely(PyString_Check(n)))
   28264             : #endif
   28265           0 :         return __Pyx_PyObject_GetAttrStr(o, n);
   28266             : #endif
   28267           0 :     return PyObject_GetAttr(o, n);
   28268             : }
   28269             : 
   28270             : /* GetItemInt */
   28271           0 : static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
   28272           0 :     PyObject *r;
   28273           0 :     if (unlikely(!j)) return NULL;
   28274           0 :     r = PyObject_GetItem(o, j);
   28275           0 :     Py_DECREF(j);
   28276             :     return r;
   28277             : }
   28278             : static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
   28279             :                                                               CYTHON_NCP_UNUSED int wraparound,
   28280             :                                                               CYTHON_NCP_UNUSED int boundscheck) {
   28281             : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   28282             :     Py_ssize_t wrapped_i = i;
   28283             :     if (wraparound & unlikely(i < 0)) {
   28284             :         wrapped_i += PyList_GET_SIZE(o);
   28285             :     }
   28286             :     if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
   28287             :         PyObject *r = PyList_GET_ITEM(o, wrapped_i);
   28288             :         Py_INCREF(r);
   28289             :         return r;
   28290             :     }
   28291             :     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
   28292             : #else
   28293             :     return PySequence_GetItem(o, i);
   28294             : #endif
   28295             : }
   28296           0 : static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
   28297             :                                                               CYTHON_NCP_UNUSED int wraparound,
   28298             :                                                               CYTHON_NCP_UNUSED int boundscheck) {
   28299             : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   28300           0 :     Py_ssize_t wrapped_i = i;
   28301           0 :     if (wraparound & unlikely(i < 0)) {
   28302           0 :         wrapped_i += PyTuple_GET_SIZE(o);
   28303             :     }
   28304           0 :     if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
   28305           0 :         PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
   28306           0 :         Py_INCREF(r);
   28307           0 :         return r;
   28308             :     }
   28309           0 :     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
   28310             : #else
   28311             :     return PySequence_GetItem(o, i);
   28312             : #endif
   28313             : }
   28314           0 : static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
   28315             :                                                      CYTHON_NCP_UNUSED int wraparound,
   28316             :                                                      CYTHON_NCP_UNUSED int boundscheck) {
   28317             : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
   28318           0 :     if (is_list || PyList_CheckExact(o)) {
   28319           0 :         Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
   28320           0 :         if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
   28321           0 :             PyObject *r = PyList_GET_ITEM(o, n);
   28322           0 :             Py_INCREF(r);
   28323           0 :             return r;
   28324             :         }
   28325             :     }
   28326           0 :     else if (PyTuple_CheckExact(o)) {
   28327           0 :         Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
   28328           0 :         if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
   28329           0 :             PyObject *r = PyTuple_GET_ITEM(o, n);
   28330           0 :             Py_INCREF(r);
   28331           0 :             return r;
   28332             :         }
   28333             :     } else {
   28334           0 :         PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
   28335           0 :         PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
   28336           0 :         if (mm && mm->mp_subscript) {
   28337           0 :             PyObject *r, *key = PyInt_FromSsize_t(i);
   28338           0 :             if (unlikely(!key)) return NULL;
   28339           0 :             r = mm->mp_subscript(o, key);
   28340           0 :             Py_DECREF(key);
   28341           0 :             return r;
   28342             :         }
   28343           0 :         if (likely(sm && sm->sq_item)) {
   28344           0 :             if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
   28345           0 :                 Py_ssize_t l = sm->sq_length(o);
   28346           0 :                 if (likely(l >= 0)) {
   28347           0 :                     i += l;
   28348             :                 } else {
   28349           0 :                     if (!PyErr_ExceptionMatches(PyExc_OverflowError))
   28350             :                         return NULL;
   28351           0 :                     PyErr_Clear();
   28352             :                 }
   28353             :             }
   28354           0 :             return sm->sq_item(o, i);
   28355             :         }
   28356             :     }
   28357             : #else
   28358             :     if (is_list || !PyMapping_Check(o)) {
   28359             :         return PySequence_GetItem(o, i);
   28360             :     }
   28361             : #endif
   28362           0 :     return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
   28363             : }
   28364             : 
   28365             : /* PyObjectCallOneArg */
   28366           2 : static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
   28367           2 :     PyObject *args[2] = {NULL, arg};
   28368           2 :     return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
   28369             : }
   28370             : 
   28371             : /* ObjectGetItem */
   28372             : #if CYTHON_USE_TYPE_SLOTS
   28373           0 : static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) {
   28374           0 :     PyObject *runerr = NULL;
   28375           0 :     Py_ssize_t key_value;
   28376           0 :     key_value = __Pyx_PyIndex_AsSsize_t(index);
   28377           0 :     if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
   28378           0 :         return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
   28379             :     }
   28380           0 :     if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
   28381           0 :         __Pyx_TypeName index_type_name = __Pyx_PyType_GetName(Py_TYPE(index));
   28382           0 :         PyErr_Clear();
   28383           0 :         PyErr_Format(PyExc_IndexError,
   28384             :             "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name);
   28385             :         __Pyx_DECREF_TypeName(index_type_name);
   28386             :     }
   28387             :     return NULL;
   28388             : }
   28389           0 : static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) {
   28390           0 :     __Pyx_TypeName obj_type_name;
   28391           0 :     if (likely(PyType_Check(obj))) {
   28392           0 :         PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_n_s_class_getitem);
   28393           0 :         if (!meth) {
   28394           0 :             PyErr_Clear();
   28395             :         } else {
   28396           0 :             PyObject *result = __Pyx_PyObject_CallOneArg(meth, key);
   28397           0 :             Py_DECREF(meth);
   28398           0 :             return result;
   28399             :         }
   28400             :     }
   28401           0 :     obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
   28402           0 :     PyErr_Format(PyExc_TypeError,
   28403             :         "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name);
   28404           0 :     __Pyx_DECREF_TypeName(obj_type_name);
   28405           0 :     return NULL;
   28406             : }
   28407        1256 : static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) {
   28408        1256 :     PyTypeObject *tp = Py_TYPE(obj);
   28409        1256 :     PyMappingMethods *mm = tp->tp_as_mapping;
   28410        1256 :     PySequenceMethods *sm = tp->tp_as_sequence;
   28411        1256 :     if (likely(mm && mm->mp_subscript)) {
   28412        1256 :         return mm->mp_subscript(obj, key);
   28413             :     }
   28414           0 :     if (likely(sm && sm->sq_item)) {
   28415           0 :         return __Pyx_PyObject_GetIndex(obj, key);
   28416             :     }
   28417           0 :     return __Pyx_PyObject_GetItem_Slow(obj, key);
   28418             : }
   28419             : #endif
   28420             : 
   28421             : /* KeywordStringCheck */
   28422           0 : static int __Pyx_CheckKeywordStrings(
   28423             :     PyObject *kw,
   28424             :     const char* function_name,
   28425             :     int kw_allowed)
   28426             : {
   28427           0 :     PyObject* key = 0;
   28428           0 :     Py_ssize_t pos = 0;
   28429             : #if CYTHON_COMPILING_IN_PYPY
   28430             :     if (!kw_allowed && PyDict_Next(kw, &pos, &key, 0))
   28431             :         goto invalid_keyword;
   28432             :     return 1;
   28433             : #else
   28434           0 :     if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kw))) {
   28435           0 :         Py_ssize_t kwsize;
   28436             : #if CYTHON_ASSUME_SAFE_MACROS
   28437           0 :         kwsize = PyTuple_GET_SIZE(kw);
   28438             : #else
   28439             :         kwsize = PyTuple_Size(kw);
   28440             :         if (kwsize < 0) return 0;
   28441             : #endif
   28442           0 :         if (unlikely(kwsize == 0))
   28443             :             return 1;
   28444           0 :         if (!kw_allowed) {
   28445             : #if CYTHON_ASSUME_SAFE_MACROS
   28446           0 :             key = PyTuple_GET_ITEM(kw, 0);
   28447             : #else
   28448             :             key = PyTuple_GetItem(kw, pos);
   28449             :             if (!key) return 0;
   28450             : #endif
   28451           0 :             goto invalid_keyword;
   28452             :         }
   28453             : #if PY_VERSION_HEX < 0x03090000
   28454             :         for (pos = 0; pos < kwsize; pos++) {
   28455             : #if CYTHON_ASSUME_SAFE_MACROS
   28456             :             key = PyTuple_GET_ITEM(kw, pos);
   28457             : #else
   28458             :             key = PyTuple_GetItem(kw, pos);
   28459             :             if (!key) return 0;
   28460             : #endif
   28461             :             if (unlikely(!PyUnicode_Check(key)))
   28462             :                 goto invalid_keyword_type;
   28463             :         }
   28464             : #endif
   28465             :         return 1;
   28466             :     }
   28467           0 :     while (PyDict_Next(kw, &pos, &key, 0)) {
   28468             :         #if PY_MAJOR_VERSION < 3
   28469             :         if (unlikely(!PyString_Check(key)))
   28470             :         #endif
   28471           0 :             if (unlikely(!PyUnicode_Check(key)))
   28472           0 :                 goto invalid_keyword_type;
   28473             :     }
   28474           0 :     if (!kw_allowed && unlikely(key))
   28475           0 :         goto invalid_keyword;
   28476             :     return 1;
   28477           0 : invalid_keyword_type:
   28478           0 :     PyErr_Format(PyExc_TypeError,
   28479             :         "%.200s() keywords must be strings", function_name);
   28480           0 :     return 0;
   28481             : #endif
   28482           0 : invalid_keyword:
   28483             :     #if PY_MAJOR_VERSION < 3
   28484             :     PyErr_Format(PyExc_TypeError,
   28485             :         "%.200s() got an unexpected keyword argument '%.200s'",
   28486             :         function_name, PyString_AsString(key));
   28487             :     #else
   28488           0 :     PyErr_Format(PyExc_TypeError,
   28489             :         "%s() got an unexpected keyword argument '%U'",
   28490             :         function_name, key);
   28491             :     #endif
   28492           0 :     return 0;
   28493             : }
   28494             : 
   28495             : /* DivInt[Py_ssize_t] */
   28496           0 : static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) {
   28497           0 :     Py_ssize_t q = a / b;
   28498           0 :     Py_ssize_t r = a - q*b;
   28499           0 :     q -= ((r != 0) & ((r ^ b) < 0));
   28500           0 :     return q;
   28501             : }
   28502             : 
   28503             : /* GetAttr3 */
   28504             : #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1
   28505           0 : static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
   28506           0 :     __Pyx_PyThreadState_declare
   28507           0 :     __Pyx_PyThreadState_assign
   28508           0 :     if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
   28509             :         return NULL;
   28510           0 :     __Pyx_PyErr_Clear();
   28511           0 :     Py_INCREF(d);
   28512             :     return d;
   28513             : }
   28514             : #endif
   28515           0 : static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
   28516           0 :     PyObject *r;
   28517             : #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
   28518             :     int res = PyObject_GetOptionalAttr(o, n, &r);
   28519             :     return (res != 0) ? r : __Pyx_NewRef(d);
   28520             : #else
   28521             :   #if CYTHON_USE_TYPE_SLOTS
   28522           0 :     if (likely(PyString_Check(n))) {
   28523           0 :         r = __Pyx_PyObject_GetAttrStrNoError(o, n);
   28524           0 :         if (unlikely(!r) && likely(!PyErr_Occurred())) {
   28525           0 :             r = __Pyx_NewRef(d);
   28526             :         }
   28527           0 :         return r;
   28528             :     }
   28529             :   #endif
   28530           0 :     r = PyObject_GetAttr(o, n);
   28531           0 :     return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
   28532             : #endif
   28533             : }
   28534             : 
   28535             : /* PyDictVersioning */
   28536             : #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
   28537             : static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
   28538             :     PyObject *dict = Py_TYPE(obj)->tp_dict;
   28539             :     return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
   28540             : }
   28541             : static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
   28542             :     PyObject **dictptr = NULL;
   28543             :     Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
   28544             :     if (offset) {
   28545             : #if CYTHON_COMPILING_IN_CPYTHON
   28546             :         dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
   28547             : #else
   28548             :         dictptr = _PyObject_GetDictPtr(obj);
   28549             : #endif
   28550             :     }
   28551             :     return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
   28552             : }
   28553             : static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
   28554             :     PyObject *dict = Py_TYPE(obj)->tp_dict;
   28555             :     if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
   28556             :         return 0;
   28557             :     return obj_dict_version == __Pyx_get_object_dict_version(obj);
   28558             : }
   28559             : #endif
   28560             : 
   28561             : /* GetModuleGlobalName */
   28562             : #if CYTHON_USE_DICT_VERSIONS
   28563             : static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
   28564             : #else
   28565           0 : static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
   28566             : #endif
   28567             : {
   28568           0 :     PyObject *result;
   28569             : #if !CYTHON_AVOID_BORROWED_REFS
   28570             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000
   28571           0 :     result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
   28572             :     __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
   28573           0 :     if (likely(result)) {
   28574           0 :         return __Pyx_NewRef(result);
   28575           0 :     } else if (unlikely(PyErr_Occurred())) {
   28576             :         return NULL;
   28577             :     }
   28578             : #elif CYTHON_COMPILING_IN_LIMITED_API
   28579             :     if (unlikely(!__pyx_m)) {
   28580             :         return NULL;
   28581             :     }
   28582             :     result = PyObject_GetAttr(__pyx_m, name);
   28583             :     if (likely(result)) {
   28584             :         return result;
   28585             :     }
   28586             : #else
   28587             :     result = PyDict_GetItem(__pyx_d, name);
   28588             :     __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
   28589             :     if (likely(result)) {
   28590             :         return __Pyx_NewRef(result);
   28591             :     }
   28592             : #endif
   28593             : #else
   28594             :     result = PyObject_GetItem(__pyx_d, name);
   28595             :     __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
   28596             :     if (likely(result)) {
   28597             :         return __Pyx_NewRef(result);
   28598             :     }
   28599             :     PyErr_Clear();
   28600             : #endif
   28601           0 :     return __Pyx_GetBuiltinName(name);
   28602             : }
   28603             : 
   28604             : /* RaiseTooManyValuesToUnpack */
   28605           0 : static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
   28606           0 :     PyErr_Format(PyExc_ValueError,
   28607             :                  "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
   28608           0 : }
   28609             : 
   28610             : /* RaiseNeedMoreValuesToUnpack */
   28611           0 : static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
   28612           0 :     PyErr_Format(PyExc_ValueError,
   28613             :                  "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
   28614             :                  index, (index == 1) ? "" : "s");
   28615           0 : }
   28616             : 
   28617             : /* RaiseNoneIterError */
   28618           0 : static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
   28619           0 :     PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
   28620             : }
   28621             : 
   28622             : /* ExtTypeTest */
   28623         423 : static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
   28624         423 :     __Pyx_TypeName obj_type_name;
   28625         423 :     __Pyx_TypeName type_name;
   28626         423 :     if (unlikely(!type)) {
   28627           0 :         PyErr_SetString(PyExc_SystemError, "Missing type object");
   28628           0 :         return 0;
   28629             :     }
   28630         423 :     if (likely(__Pyx_TypeCheck(obj, type)))
   28631             :         return 1;
   28632           0 :     obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
   28633           0 :     type_name = __Pyx_PyType_GetName(type);
   28634           0 :     PyErr_Format(PyExc_TypeError,
   28635             :                  "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME,
   28636             :                  obj_type_name, type_name);
   28637           0 :     __Pyx_DECREF_TypeName(obj_type_name);
   28638           0 :     __Pyx_DECREF_TypeName(type_name);
   28639           0 :     return 0;
   28640             : }
   28641             : 
   28642             : /* GetTopmostException */
   28643             : #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
   28644             : static _PyErr_StackItem *
   28645           5 : __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
   28646             : {
   28647           5 :     _PyErr_StackItem *exc_info = tstate->exc_info;
   28648          25 :     while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
   28649          25 :            exc_info->previous_item != NULL)
   28650             :     {
   28651             :         exc_info = exc_info->previous_item;
   28652             :     }
   28653           5 :     return exc_info;
   28654             : }
   28655             : #endif
   28656             : 
   28657             : /* SaveResetException */
   28658             : #if CYTHON_FAST_THREAD_STATE
   28659           5 : static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
   28660             :   #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
   28661           5 :     _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
   28662           5 :     PyObject *exc_value = exc_info->exc_value;
   28663           5 :     if (exc_value == NULL || exc_value == Py_None) {
   28664           5 :         *value = NULL;
   28665           5 :         *type = NULL;
   28666           5 :         *tb = NULL;
   28667             :     } else {
   28668           0 :         *value = exc_value;
   28669           0 :         Py_INCREF(*value);
   28670           0 :         *type = (PyObject*) Py_TYPE(exc_value);
   28671           0 :         Py_INCREF(*type);
   28672           0 :         *tb = PyException_GetTraceback(exc_value);
   28673             :     }
   28674             :   #elif CYTHON_USE_EXC_INFO_STACK
   28675             :     _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
   28676             :     *type = exc_info->exc_type;
   28677             :     *value = exc_info->exc_value;
   28678             :     *tb = exc_info->exc_traceback;
   28679             :     Py_XINCREF(*type);
   28680             :     Py_XINCREF(*value);
   28681             :     Py_XINCREF(*tb);
   28682             :   #else
   28683             :     *type = tstate->exc_type;
   28684             :     *value = tstate->exc_value;
   28685             :     *tb = tstate->exc_traceback;
   28686             :     Py_XINCREF(*type);
   28687             :     Py_XINCREF(*value);
   28688             :     Py_XINCREF(*tb);
   28689             :   #endif
   28690           5 : }
   28691           0 : static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
   28692             :   #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
   28693           0 :     _PyErr_StackItem *exc_info = tstate->exc_info;
   28694           0 :     PyObject *tmp_value = exc_info->exc_value;
   28695           0 :     exc_info->exc_value = value;
   28696           0 :     Py_XDECREF(tmp_value);
   28697           0 :     Py_XDECREF(type);
   28698           0 :     Py_XDECREF(tb);
   28699             :   #else
   28700             :     PyObject *tmp_type, *tmp_value, *tmp_tb;
   28701             :     #if CYTHON_USE_EXC_INFO_STACK
   28702             :     _PyErr_StackItem *exc_info = tstate->exc_info;
   28703             :     tmp_type = exc_info->exc_type;
   28704             :     tmp_value = exc_info->exc_value;
   28705             :     tmp_tb = exc_info->exc_traceback;
   28706             :     exc_info->exc_type = type;
   28707             :     exc_info->exc_value = value;
   28708             :     exc_info->exc_traceback = tb;
   28709             :     #else
   28710             :     tmp_type = tstate->exc_type;
   28711             :     tmp_value = tstate->exc_value;
   28712             :     tmp_tb = tstate->exc_traceback;
   28713             :     tstate->exc_type = type;
   28714             :     tstate->exc_value = value;
   28715             :     tstate->exc_traceback = tb;
   28716             :     #endif
   28717             :     Py_XDECREF(tmp_type);
   28718             :     Py_XDECREF(tmp_value);
   28719             :     Py_XDECREF(tmp_tb);
   28720             :   #endif
   28721           0 : }
   28722             : #endif
   28723             : 
   28724             : /* GetException */
   28725             : #if CYTHON_FAST_THREAD_STATE
   28726           0 : static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
   28727             : #else
   28728             : static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
   28729             : #endif
   28730             : {
   28731           0 :     PyObject *local_type = NULL, *local_value, *local_tb = NULL;
   28732             : #if CYTHON_FAST_THREAD_STATE
   28733           0 :     PyObject *tmp_type, *tmp_value, *tmp_tb;
   28734             :   #if PY_VERSION_HEX >= 0x030C00A6
   28735           0 :     local_value = tstate->current_exception;
   28736           0 :     tstate->current_exception = 0;
   28737           0 :     if (likely(local_value)) {
   28738           0 :         local_type = (PyObject*) Py_TYPE(local_value);
   28739           0 :         Py_INCREF(local_type);
   28740           0 :         local_tb = PyException_GetTraceback(local_value);
   28741             :     }
   28742             :   #else
   28743             :     local_type = tstate->curexc_type;
   28744             :     local_value = tstate->curexc_value;
   28745             :     local_tb = tstate->curexc_traceback;
   28746             :     tstate->curexc_type = 0;
   28747             :     tstate->curexc_value = 0;
   28748             :     tstate->curexc_traceback = 0;
   28749             :   #endif
   28750             : #else
   28751             :     PyErr_Fetch(&local_type, &local_value, &local_tb);
   28752             : #endif
   28753           0 :     PyErr_NormalizeException(&local_type, &local_value, &local_tb);
   28754             : #if CYTHON_FAST_THREAD_STATE && PY_VERSION_HEX >= 0x030C00A6
   28755           0 :     if (unlikely(tstate->current_exception))
   28756             : #elif CYTHON_FAST_THREAD_STATE
   28757             :     if (unlikely(tstate->curexc_type))
   28758             : #else
   28759             :     if (unlikely(PyErr_Occurred()))
   28760             : #endif
   28761           0 :         goto bad;
   28762             :     #if PY_MAJOR_VERSION >= 3
   28763           0 :     if (local_tb) {
   28764           0 :         if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
   28765           0 :             goto bad;
   28766             :     }
   28767             :     #endif
   28768           0 :     Py_XINCREF(local_tb);
   28769           0 :     Py_XINCREF(local_type);
   28770           0 :     Py_XINCREF(local_value);
   28771           0 :     *type = local_type;
   28772           0 :     *value = local_value;
   28773           0 :     *tb = local_tb;
   28774             : #if CYTHON_FAST_THREAD_STATE
   28775             :     #if CYTHON_USE_EXC_INFO_STACK
   28776             :     {
   28777           0 :         _PyErr_StackItem *exc_info = tstate->exc_info;
   28778             :       #if PY_VERSION_HEX >= 0x030B00a4
   28779           0 :         tmp_value = exc_info->exc_value;
   28780           0 :         exc_info->exc_value = local_value;
   28781           0 :         tmp_type = NULL;
   28782           0 :         tmp_tb = NULL;
   28783           0 :         Py_XDECREF(local_type);
   28784           0 :         Py_XDECREF(local_tb);
   28785             :       #else
   28786             :         tmp_type = exc_info->exc_type;
   28787             :         tmp_value = exc_info->exc_value;
   28788             :         tmp_tb = exc_info->exc_traceback;
   28789             :         exc_info->exc_type = local_type;
   28790             :         exc_info->exc_value = local_value;
   28791             :         exc_info->exc_traceback = local_tb;
   28792             :       #endif
   28793             :     }
   28794             :     #else
   28795             :     tmp_type = tstate->exc_type;
   28796             :     tmp_value = tstate->exc_value;
   28797             :     tmp_tb = tstate->exc_traceback;
   28798             :     tstate->exc_type = local_type;
   28799             :     tstate->exc_value = local_value;
   28800             :     tstate->exc_traceback = local_tb;
   28801             :     #endif
   28802           0 :     Py_XDECREF(tmp_type);
   28803           0 :     Py_XDECREF(tmp_value);
   28804           0 :     Py_XDECREF(tmp_tb);
   28805             : #else
   28806             :     PyErr_SetExcInfo(local_type, local_value, local_tb);
   28807             : #endif
   28808           0 :     return 0;
   28809           0 : bad:
   28810           0 :     *type = 0;
   28811           0 :     *value = 0;
   28812           0 :     *tb = 0;
   28813           0 :     Py_XDECREF(local_type);
   28814           0 :     Py_XDECREF(local_value);
   28815           0 :     Py_XDECREF(local_tb);
   28816           0 :     return -1;
   28817             : }
   28818             : 
   28819             : /* SwapException */
   28820             : #if CYTHON_FAST_THREAD_STATE
   28821           0 : static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
   28822           0 :     PyObject *tmp_type, *tmp_value, *tmp_tb;
   28823             :   #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
   28824           0 :     _PyErr_StackItem *exc_info = tstate->exc_info;
   28825           0 :     tmp_value = exc_info->exc_value;
   28826           0 :     exc_info->exc_value = *value;
   28827           0 :     if (tmp_value == NULL || tmp_value == Py_None) {
   28828           0 :         Py_XDECREF(tmp_value);
   28829           0 :         tmp_value = NULL;
   28830           0 :         tmp_type = NULL;
   28831           0 :         tmp_tb = NULL;
   28832             :     } else {
   28833           0 :         tmp_type = (PyObject*) Py_TYPE(tmp_value);
   28834           0 :         Py_INCREF(tmp_type);
   28835             :         #if CYTHON_COMPILING_IN_CPYTHON
   28836           0 :         tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback;
   28837           0 :         Py_XINCREF(tmp_tb);
   28838             :         #else
   28839             :         tmp_tb = PyException_GetTraceback(tmp_value);
   28840             :         #endif
   28841             :     }
   28842             :   #elif CYTHON_USE_EXC_INFO_STACK
   28843             :     _PyErr_StackItem *exc_info = tstate->exc_info;
   28844             :     tmp_type = exc_info->exc_type;
   28845             :     tmp_value = exc_info->exc_value;
   28846             :     tmp_tb = exc_info->exc_traceback;
   28847             :     exc_info->exc_type = *type;
   28848             :     exc_info->exc_value = *value;
   28849             :     exc_info->exc_traceback = *tb;
   28850             :   #else
   28851             :     tmp_type = tstate->exc_type;
   28852             :     tmp_value = tstate->exc_value;
   28853             :     tmp_tb = tstate->exc_traceback;
   28854             :     tstate->exc_type = *type;
   28855             :     tstate->exc_value = *value;
   28856             :     tstate->exc_traceback = *tb;
   28857             :   #endif
   28858           0 :     *type = tmp_type;
   28859           0 :     *value = tmp_value;
   28860           0 :     *tb = tmp_tb;
   28861           0 : }
   28862             : #else
   28863             : static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
   28864             :     PyObject *tmp_type, *tmp_value, *tmp_tb;
   28865             :     PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
   28866             :     PyErr_SetExcInfo(*type, *value, *tb);
   28867             :     *type = tmp_type;
   28868             :     *value = tmp_value;
   28869             :     *tb = tmp_tb;
   28870             : }
   28871             : #endif
   28872             : 
   28873             : /* Import */
   28874           0 : static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
   28875           0 :     PyObject *module = 0;
   28876           0 :     PyObject *empty_dict = 0;
   28877           0 :     PyObject *empty_list = 0;
   28878             :     #if PY_MAJOR_VERSION < 3
   28879             :     PyObject *py_import;
   28880             :     py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
   28881             :     if (unlikely(!py_import))
   28882             :         goto bad;
   28883             :     if (!from_list) {
   28884             :         empty_list = PyList_New(0);
   28885             :         if (unlikely(!empty_list))
   28886             :             goto bad;
   28887             :         from_list = empty_list;
   28888             :     }
   28889             :     #endif
   28890           0 :     empty_dict = PyDict_New();
   28891           0 :     if (unlikely(!empty_dict))
   28892           0 :         goto bad;
   28893             :     {
   28894             :         #if PY_MAJOR_VERSION >= 3
   28895           0 :         if (level == -1) {
   28896           0 :             if (strchr(__Pyx_MODULE_NAME, '.') != NULL) {
   28897           0 :                 module = PyImport_ImportModuleLevelObject(
   28898           0 :                     name, __pyx_d, empty_dict, from_list, 1);
   28899           0 :                 if (unlikely(!module)) {
   28900           0 :                     if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
   28901           0 :                         goto bad;
   28902           0 :                     PyErr_Clear();
   28903             :                 }
   28904             :             }
   28905           0 :             level = 0;
   28906             :         }
   28907             :         #endif
   28908           0 :         if (!module) {
   28909             :             #if PY_MAJOR_VERSION < 3
   28910             :             PyObject *py_level = PyInt_FromLong(level);
   28911             :             if (unlikely(!py_level))
   28912             :                 goto bad;
   28913             :             module = PyObject_CallFunctionObjArgs(py_import,
   28914             :                 name, __pyx_d, empty_dict, from_list, py_level, (PyObject *)NULL);
   28915             :             Py_DECREF(py_level);
   28916             :             #else
   28917           0 :             module = PyImport_ImportModuleLevelObject(
   28918           0 :                 name, __pyx_d, empty_dict, from_list, level);
   28919             :             #endif
   28920             :         }
   28921             :     }
   28922           0 : bad:
   28923           0 :     Py_XDECREF(empty_dict);
   28924           0 :     Py_XDECREF(empty_list);
   28925             :     #if PY_MAJOR_VERSION < 3
   28926             :     Py_XDECREF(py_import);
   28927             :     #endif
   28928           0 :     return module;
   28929             : }
   28930             : 
   28931             : /* ImportDottedModule */
   28932             : #if PY_MAJOR_VERSION >= 3
   28933           0 : static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) {
   28934           0 :     PyObject *partial_name = NULL, *slice = NULL, *sep = NULL;
   28935           0 :     if (unlikely(PyErr_Occurred())) {
   28936           0 :         PyErr_Clear();
   28937             :     }
   28938           0 :     if (likely(PyTuple_GET_SIZE(parts_tuple) == count)) {
   28939             :         partial_name = name;
   28940             :     } else {
   28941           0 :         slice = PySequence_GetSlice(parts_tuple, 0, count);
   28942           0 :         if (unlikely(!slice))
   28943           0 :             goto bad;
   28944           0 :         sep = PyUnicode_FromStringAndSize(".", 1);
   28945           0 :         if (unlikely(!sep))
   28946           0 :             goto bad;
   28947           0 :         partial_name = PyUnicode_Join(sep, slice);
   28948             :     }
   28949           0 :     PyErr_Format(
   28950             : #if PY_MAJOR_VERSION < 3
   28951             :         PyExc_ImportError,
   28952             :         "No module named '%s'", PyString_AS_STRING(partial_name));
   28953             : #else
   28954             : #if PY_VERSION_HEX >= 0x030600B1
   28955             :         PyExc_ModuleNotFoundError,
   28956             : #else
   28957             :         PyExc_ImportError,
   28958             : #endif
   28959             :         "No module named '%U'", partial_name);
   28960             : #endif
   28961           0 : bad:
   28962           0 :     Py_XDECREF(sep);
   28963           0 :     Py_XDECREF(slice);
   28964           0 :     Py_XDECREF(partial_name);
   28965           0 :     return NULL;
   28966             : }
   28967             : #endif
   28968             : #if PY_MAJOR_VERSION >= 3
   28969           0 : static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) {
   28970           0 :     PyObject *imported_module;
   28971             : #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM  < 0x07030400)
   28972             :     PyObject *modules = PyImport_GetModuleDict();
   28973             :     if (unlikely(!modules))
   28974             :         return NULL;
   28975             :     imported_module = __Pyx_PyDict_GetItemStr(modules, name);
   28976             :     Py_XINCREF(imported_module);
   28977             : #else
   28978           0 :     imported_module = PyImport_GetModule(name);
   28979             : #endif
   28980           0 :     return imported_module;
   28981             : }
   28982             : #endif
   28983             : #if PY_MAJOR_VERSION >= 3
   28984           0 : static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) {
   28985           0 :     Py_ssize_t i, nparts;
   28986           0 :     nparts = PyTuple_GET_SIZE(parts_tuple);
   28987           0 :     for (i=1; i < nparts && module; i++) {
   28988           0 :         PyObject *part, *submodule;
   28989             : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   28990           0 :         part = PyTuple_GET_ITEM(parts_tuple, i);
   28991             : #else
   28992             :         part = PySequence_ITEM(parts_tuple, i);
   28993             : #endif
   28994           0 :         submodule = __Pyx_PyObject_GetAttrStrNoError(module, part);
   28995             : #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
   28996             :         Py_DECREF(part);
   28997             : #endif
   28998           0 :         Py_DECREF(module);
   28999           0 :         module = submodule;
   29000             :     }
   29001           0 :     if (unlikely(!module)) {
   29002           0 :         return __Pyx__ImportDottedModule_Error(name, parts_tuple, i);
   29003             :     }
   29004             :     return module;
   29005             : }
   29006             : #endif
   29007           0 : static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
   29008             : #if PY_MAJOR_VERSION < 3
   29009             :     PyObject *module, *from_list, *star = __pyx_n_s__3;
   29010             :     CYTHON_UNUSED_VAR(parts_tuple);
   29011             :     from_list = PyList_New(1);
   29012             :     if (unlikely(!from_list))
   29013             :         return NULL;
   29014             :     Py_INCREF(star);
   29015             :     PyList_SET_ITEM(from_list, 0, star);
   29016             :     module = __Pyx_Import(name, from_list, 0);
   29017             :     Py_DECREF(from_list);
   29018             :     return module;
   29019             : #else
   29020           0 :     PyObject *imported_module;
   29021           0 :     PyObject *module = __Pyx_Import(name, NULL, 0);
   29022           0 :     if (!parts_tuple || unlikely(!module))
   29023             :         return module;
   29024           0 :     imported_module = __Pyx__ImportDottedModule_Lookup(name);
   29025           0 :     if (likely(imported_module)) {
   29026           0 :         Py_DECREF(module);
   29027           0 :         return imported_module;
   29028             :     }
   29029           0 :     PyErr_Clear();
   29030           0 :     return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple);
   29031             : #endif
   29032             : }
   29033           0 : static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
   29034             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030400B1
   29035           0 :     PyObject *module = __Pyx__ImportDottedModule_Lookup(name);
   29036           0 :     if (likely(module)) {
   29037           0 :         PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_n_s_spec);
   29038           0 :         if (likely(spec)) {
   29039           0 :             PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_n_s_initializing);
   29040           0 :             if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) {
   29041           0 :                 Py_DECREF(spec);
   29042             :                 spec = NULL;
   29043             :             }
   29044           0 :             Py_XDECREF(unsafe);
   29045             :         }
   29046           0 :         if (likely(!spec)) {
   29047           0 :             PyErr_Clear();
   29048           0 :             return module;
   29049             :         }
   29050           0 :         Py_DECREF(spec);
   29051           0 :         Py_DECREF(module);
   29052           0 :     } else if (PyErr_Occurred()) {
   29053           0 :         PyErr_Clear();
   29054             :     }
   29055             : #endif
   29056           0 :     return __Pyx__ImportDottedModule(name, parts_tuple);
   29057             : }
   29058             : 
   29059             : /* FastTypeChecks */
   29060             : #if CYTHON_COMPILING_IN_CPYTHON
   29061             : static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
   29062           0 :     while (a) {
   29063           0 :         a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
   29064           0 :         if (a == b)
   29065             :             return 1;
   29066             :     }
   29067           0 :     return b == &PyBaseObject_Type;
   29068             : }
   29069         564 : static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
   29070         564 :     PyObject *mro;
   29071         564 :     if (a == b) return 1;
   29072         141 :     mro = a->tp_mro;
   29073         141 :     if (likely(mro)) {
   29074         141 :         Py_ssize_t i, n;
   29075         141 :         n = PyTuple_GET_SIZE(mro);
   29076         423 :         for (i = 0; i < n; i++) {
   29077         282 :             if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
   29078             :                 return 1;
   29079             :         }
   29080             :         return 0;
   29081             :     }
   29082         564 :     return __Pyx_InBases(a, b);
   29083             : }
   29084           2 : static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
   29085           2 :     PyObject *mro;
   29086           2 :     if (cls == a || cls == b) return 1;
   29087           2 :     mro = cls->tp_mro;
   29088           2 :     if (likely(mro)) {
   29089           2 :         Py_ssize_t i, n;
   29090           2 :         n = PyTuple_GET_SIZE(mro);
   29091           6 :         for (i = 0; i < n; i++) {
   29092           4 :             PyObject *base = PyTuple_GET_ITEM(mro, i);
   29093           4 :             if (base == (PyObject *)a || base == (PyObject *)b)
   29094             :                 return 1;
   29095             :         }
   29096             :         return 0;
   29097             :     }
   29098           0 :     return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
   29099             : }
   29100             : #if PY_MAJOR_VERSION == 2
   29101             : static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
   29102             :     PyObject *exception, *value, *tb;
   29103             :     int res;
   29104             :     __Pyx_PyThreadState_declare
   29105             :     __Pyx_PyThreadState_assign
   29106             :     __Pyx_ErrFetch(&exception, &value, &tb);
   29107             :     res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
   29108             :     if (unlikely(res == -1)) {
   29109             :         PyErr_WriteUnraisable(err);
   29110             :         res = 0;
   29111             :     }
   29112             :     if (!res) {
   29113             :         res = PyObject_IsSubclass(err, exc_type2);
   29114             :         if (unlikely(res == -1)) {
   29115             :             PyErr_WriteUnraisable(err);
   29116             :             res = 0;
   29117             :         }
   29118             :     }
   29119             :     __Pyx_ErrRestore(exception, value, tb);
   29120             :     return res;
   29121             : }
   29122             : #else
   29123           0 : static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
   29124           0 :     if (exc_type1) {
   29125             :         return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
   29126             :     } else {
   29127           0 :         return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
   29128             :     }
   29129             : }
   29130             : #endif
   29131           0 : static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
   29132           0 :     Py_ssize_t i, n;
   29133           0 :     assert(PyExceptionClass_Check(exc_type));
   29134           0 :     n = PyTuple_GET_SIZE(tuple);
   29135             : #if PY_MAJOR_VERSION >= 3
   29136           0 :     for (i=0; i<n; i++) {
   29137           0 :         if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
   29138             :     }
   29139             : #endif
   29140           0 :     for (i=0; i<n; i++) {
   29141           0 :         PyObject *t = PyTuple_GET_ITEM(tuple, i);
   29142             :         #if PY_MAJOR_VERSION < 3
   29143             :         if (likely(exc_type == t)) return 1;
   29144             :         #endif
   29145           0 :         if (likely(PyExceptionClass_Check(t))) {
   29146           0 :             if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
   29147             :         } else {
   29148           0 :         }
   29149             :     }
   29150             :     return 0;
   29151             : }
   29152           0 : static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
   29153           0 :     if (likely(err == exc_type)) return 1;
   29154           0 :     if (likely(PyExceptionClass_Check(err))) {
   29155           0 :         if (likely(PyExceptionClass_Check(exc_type))) {
   29156           0 :             return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
   29157           0 :         } else if (likely(PyTuple_Check(exc_type))) {
   29158           0 :             return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
   29159             :         } else {
   29160           0 :         }
   29161             :     }
   29162           0 :     return PyErr_GivenExceptionMatches(err, exc_type);
   29163             : }
   29164             : static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
   29165             :     assert(PyExceptionClass_Check(exc_type1));
   29166             :     assert(PyExceptionClass_Check(exc_type2));
   29167             :     if (likely(err == exc_type1 || err == exc_type2)) return 1;
   29168             :     if (likely(PyExceptionClass_Check(err))) {
   29169             :         return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
   29170             :     }
   29171             :     return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
   29172             : }
   29173             : #endif
   29174             : 
   29175             : /* PySequenceMultiply */
   29176           0 : static PyObject* __Pyx_PySequence_Multiply_Generic(PyObject *seq, Py_ssize_t mul) {
   29177           0 :     PyObject *result, *pymul = PyInt_FromSsize_t(mul);
   29178           0 :     if (unlikely(!pymul))
   29179             :         return NULL;
   29180           0 :     result = PyNumber_Multiply(seq, pymul);
   29181           0 :     Py_DECREF(pymul);
   29182             :     return result;
   29183             : }
   29184           0 : static CYTHON_INLINE PyObject* __Pyx_PySequence_Multiply(PyObject *seq, Py_ssize_t mul) {
   29185             : #if CYTHON_USE_TYPE_SLOTS
   29186           0 :     PyTypeObject *type = Py_TYPE(seq);
   29187           0 :     if (likely(type->tp_as_sequence && type->tp_as_sequence->sq_repeat)) {
   29188           0 :         return type->tp_as_sequence->sq_repeat(seq, mul);
   29189             :     } else
   29190             : #endif
   29191             :     {
   29192           0 :         return __Pyx_PySequence_Multiply_Generic(seq, mul);
   29193             :     }
   29194             : }
   29195             : 
   29196             : /* SetItemInt */
   29197           0 : static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
   29198           0 :     int r;
   29199           0 :     if (unlikely(!j)) return -1;
   29200           0 :     r = PyObject_SetItem(o, j, v);
   29201           0 :     Py_DECREF(j);
   29202             :     return r;
   29203             : }
   29204           0 : static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
   29205             :                                                CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
   29206             : #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
   29207           0 :     if (is_list || PyList_CheckExact(o)) {
   29208           0 :         Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
   29209           0 :         if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
   29210           0 :             PyObject* old = PyList_GET_ITEM(o, n);
   29211           0 :             Py_INCREF(v);
   29212           0 :             PyList_SET_ITEM(o, n, v);
   29213           0 :             Py_DECREF(old);
   29214           0 :             return 1;
   29215             :         }
   29216             :     } else {
   29217           0 :         PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
   29218           0 :         PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
   29219           0 :         if (mm && mm->mp_ass_subscript) {
   29220           0 :             int r;
   29221           0 :             PyObject *key = PyInt_FromSsize_t(i);
   29222           0 :             if (unlikely(!key)) return -1;
   29223           0 :             r = mm->mp_ass_subscript(o, key, v);
   29224           0 :             Py_DECREF(key);
   29225           0 :             return r;
   29226             :         }
   29227           0 :         if (likely(sm && sm->sq_ass_item)) {
   29228           0 :             if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
   29229           0 :                 Py_ssize_t l = sm->sq_length(o);
   29230           0 :                 if (likely(l >= 0)) {
   29231           0 :                     i += l;
   29232             :                 } else {
   29233           0 :                     if (!PyErr_ExceptionMatches(PyExc_OverflowError))
   29234             :                         return -1;
   29235           0 :                     PyErr_Clear();
   29236             :                 }
   29237             :             }
   29238           0 :             return sm->sq_ass_item(o, i, v);
   29239             :         }
   29240             :     }
   29241             : #else
   29242             :     if (is_list || !PyMapping_Check(o))
   29243             :     {
   29244             :         return PySequence_SetItem(o, i, v);
   29245             :     }
   29246             : #endif
   29247           0 :     return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
   29248             : }
   29249             : 
   29250             : /* RaiseUnboundLocalError */
   29251           0 : static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
   29252           0 :     PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
   29253             : }
   29254             : 
   29255             : /* DivInt[long] */
   29256           0 : static CYTHON_INLINE long __Pyx_div_long(long a, long b) {
   29257           0 :     long q = a / b;
   29258           0 :     long r = a - q*b;
   29259           0 :     q -= ((r != 0) & ((r ^ b) < 0));
   29260           0 :     return q;
   29261             : }
   29262             : 
   29263             : /* ImportFrom */
   29264           0 : static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
   29265           0 :     PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
   29266           0 :     if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
   29267           0 :         const char* module_name_str = 0;
   29268           0 :         PyObject* module_name = 0;
   29269           0 :         PyObject* module_dot = 0;
   29270           0 :         PyObject* full_name = 0;
   29271           0 :         PyErr_Clear();
   29272           0 :         module_name_str = PyModule_GetName(module);
   29273           0 :         if (unlikely(!module_name_str)) { goto modbad; }
   29274           0 :         module_name = PyUnicode_FromString(module_name_str);
   29275           0 :         if (unlikely(!module_name)) { goto modbad; }
   29276           0 :         module_dot = PyUnicode_Concat(module_name, __pyx_kp_u__2);
   29277           0 :         if (unlikely(!module_dot)) { goto modbad; }
   29278           0 :         full_name = PyUnicode_Concat(module_dot, name);
   29279           0 :         if (unlikely(!full_name)) { goto modbad; }
   29280             :         #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM  < 0x07030400)
   29281             :         {
   29282             :             PyObject *modules = PyImport_GetModuleDict();
   29283             :             if (unlikely(!modules))
   29284             :                 goto modbad;
   29285             :             value = PyObject_GetItem(modules, full_name);
   29286             :         }
   29287             :         #else
   29288           0 :         value = PyImport_GetModule(full_name);
   29289             :         #endif
   29290           0 :       modbad:
   29291           0 :         Py_XDECREF(full_name);
   29292           0 :         Py_XDECREF(module_dot);
   29293           0 :         Py_XDECREF(module_name);
   29294             :     }
   29295           0 :     if (unlikely(!value)) {
   29296           0 :         PyErr_Format(PyExc_ImportError,
   29297             :         #if PY_MAJOR_VERSION < 3
   29298             :             "cannot import name %.230s", PyString_AS_STRING(name));
   29299             :         #else
   29300             :             "cannot import name %S", name);
   29301             :         #endif
   29302             :     }
   29303           0 :     return value;
   29304             : }
   29305             : 
   29306             : /* HasAttr */
   29307           0 : static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
   29308           0 :     PyObject *r;
   29309           0 :     if (unlikely(!__Pyx_PyBaseString_Check(n))) {
   29310           0 :         PyErr_SetString(PyExc_TypeError,
   29311             :                         "hasattr(): attribute name must be string");
   29312           0 :         return -1;
   29313             :     }
   29314           0 :     r = __Pyx_GetAttr(o, n);
   29315           0 :     if (!r) {
   29316           0 :         PyErr_Clear();
   29317           0 :         return 0;
   29318             :     } else {
   29319           0 :         Py_DECREF(r);
   29320           0 :         return 1;
   29321             :     }
   29322             : }
   29323             : 
   29324             : /* IsLittleEndian */
   29325           0 : static CYTHON_INLINE int __Pyx_Is_Little_Endian(void)
   29326             : {
   29327           0 :   union {
   29328             :     uint32_t u32;
   29329             :     uint8_t u8[4];
   29330             :   } S;
   29331           0 :   S.u32 = 0x01020304;
   29332           0 :   return S.u8[0] == 4;
   29333             : }
   29334             : 
   29335             : /* BufferFormatCheck */
   29336         423 : static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
   29337             :                               __Pyx_BufFmt_StackElem* stack,
   29338             :                               __Pyx_TypeInfo* type) {
   29339         423 :   stack[0].field = &ctx->root;
   29340         423 :   stack[0].parent_offset = 0;
   29341         423 :   ctx->root.type = type;
   29342         423 :   ctx->root.name = "buffer dtype";
   29343         423 :   ctx->root.offset = 0;
   29344         423 :   ctx->head = stack;
   29345         423 :   ctx->head->field = &ctx->root;
   29346         423 :   ctx->fmt_offset = 0;
   29347         423 :   ctx->head->parent_offset = 0;
   29348         423 :   ctx->new_packmode = '@';
   29349         423 :   ctx->enc_packmode = '@';
   29350         423 :   ctx->new_count = 1;
   29351         423 :   ctx->enc_count = 0;
   29352         423 :   ctx->enc_type = 0;
   29353         423 :   ctx->is_complex = 0;
   29354         423 :   ctx->is_valid_array = 0;
   29355         423 :   ctx->struct_alignment = 0;
   29356         423 :   while (type->typegroup == 'S') {
   29357           0 :     ++ctx->head;
   29358           0 :     ctx->head->field = type->fields;
   29359           0 :     ctx->head->parent_offset = 0;
   29360           0 :     type = type->fields->type;
   29361             :   }
   29362         423 : }
   29363           0 : static int __Pyx_BufFmt_ParseNumber(const char** ts) {
   29364           0 :     int count;
   29365           0 :     const char* t = *ts;
   29366           0 :     if (*t < '0' || *t > '9') {
   29367             :       return -1;
   29368             :     } else {
   29369           0 :         count = *t++ - '0';
   29370           0 :         while (*t >= '0' && *t <= '9') {
   29371           0 :             count *= 10;
   29372           0 :             count += *t++ - '0';
   29373             :         }
   29374             :     }
   29375           0 :     *ts = t;
   29376           0 :     return count;
   29377             : }
   29378           0 : static int __Pyx_BufFmt_ExpectNumber(const char **ts) {
   29379           0 :     int number = __Pyx_BufFmt_ParseNumber(ts);
   29380           0 :     if (number == -1)
   29381           0 :         PyErr_Format(PyExc_ValueError,\
   29382           0 :                      "Does not understand character buffer dtype format string ('%c')", **ts);
   29383           0 :     return number;
   29384             : }
   29385           0 : static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) {
   29386           0 :   PyErr_Format(PyExc_ValueError,
   29387             :                "Unexpected format string character: '%c'", ch);
   29388             : }
   29389           0 : static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) {
   29390           0 :   switch (ch) {
   29391             :     case '?': return "'bool'";
   29392           0 :     case 'c': return "'char'";
   29393           0 :     case 'b': return "'signed char'";
   29394           0 :     case 'B': return "'unsigned char'";
   29395           0 :     case 'h': return "'short'";
   29396           0 :     case 'H': return "'unsigned short'";
   29397           0 :     case 'i': return "'int'";
   29398           0 :     case 'I': return "'unsigned int'";
   29399           0 :     case 'l': return "'long'";
   29400           0 :     case 'L': return "'unsigned long'";
   29401           0 :     case 'q': return "'long long'";
   29402           0 :     case 'Q': return "'unsigned long long'";
   29403           0 :     case 'f': return (is_complex ? "'complex float'" : "'float'");
   29404           0 :     case 'd': return (is_complex ? "'complex double'" : "'double'");
   29405           0 :     case 'g': return (is_complex ? "'complex long double'" : "'long double'");
   29406           0 :     case 'T': return "a struct";
   29407           0 :     case 'O': return "Python object";
   29408           0 :     case 'P': return "a pointer";
   29409           0 :     case 's': case 'p': return "a string";
   29410           0 :     case 0: return "end";
   29411           0 :     default: return "unparsable format string";
   29412             :   }
   29413             : }
   29414           0 : static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) {
   29415           0 :   switch (ch) {
   29416             :     case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
   29417           0 :     case 'h': case 'H': return 2;
   29418             :     case 'i': case 'I': case 'l': case 'L': return 4;
   29419             :     case 'q': case 'Q': return 8;
   29420           0 :     case 'f': return (is_complex ? 8 : 4);
   29421           0 :     case 'd': return (is_complex ? 16 : 8);
   29422           0 :     case 'g': {
   29423           0 :       PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g')..");
   29424           0 :       return 0;
   29425             :     }
   29426             :     case 'O': case 'P': return sizeof(void*);
   29427           0 :     default:
   29428           0 :       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
   29429           0 :       return 0;
   29430             :     }
   29431             : }
   29432         423 : static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) {
   29433         423 :   switch (ch) {
   29434             :     case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
   29435           0 :     case 'h': case 'H': return sizeof(short);
   29436             :     case 'i': case 'I': return sizeof(int);
   29437             :     case 'l': case 'L': return sizeof(long);
   29438             :     #ifdef HAVE_LONG_LONG
   29439             :     case 'q': case 'Q': return sizeof(PY_LONG_LONG);
   29440             :     #endif
   29441          24 :     case 'f': return sizeof(float) * (is_complex ? 2 : 1);
   29442         258 :     case 'd': return sizeof(double) * (is_complex ? 2 : 1);
   29443           0 :     case 'g': return sizeof(long double) * (is_complex ? 2 : 1);
   29444             :     case 'O': case 'P': return sizeof(void*);
   29445           0 :     default: {
   29446           0 :       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
   29447           0 :       return 0;
   29448             :     }
   29449             :   }
   29450             : }
   29451             : typedef struct { char c; short x; } __Pyx_st_short;
   29452             : typedef struct { char c; int x; } __Pyx_st_int;
   29453             : typedef struct { char c; long x; } __Pyx_st_long;
   29454             : typedef struct { char c; float x; } __Pyx_st_float;
   29455             : typedef struct { char c; double x; } __Pyx_st_double;
   29456             : typedef struct { char c; long double x; } __Pyx_st_longdouble;
   29457             : typedef struct { char c; void *x; } __Pyx_st_void_p;
   29458             : #ifdef HAVE_LONG_LONG
   29459             : typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong;
   29460             : #endif
   29461         423 : static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, int is_complex) {
   29462         423 :   CYTHON_UNUSED_VAR(is_complex);
   29463         423 :   switch (ch) {
   29464             :     case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
   29465           0 :     case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short);
   29466             :     case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int);
   29467             :     case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long);
   29468             : #ifdef HAVE_LONG_LONG
   29469             :     case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG);
   29470             : #endif
   29471             :     case 'f': return sizeof(__Pyx_st_float) - sizeof(float);
   29472             :     case 'd': return sizeof(__Pyx_st_double) - sizeof(double);
   29473           0 :     case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double);
   29474             :     case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*);
   29475           0 :     default:
   29476           0 :       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
   29477           0 :       return 0;
   29478             :     }
   29479             : }
   29480             : /* These are for computing the padding at the end of the struct to align
   29481             :    on the first member of the struct. This will probably the same as above,
   29482             :    but we don't have any guarantees.
   29483             :  */
   29484             : typedef struct { short x; char c; } __Pyx_pad_short;
   29485             : typedef struct { int x; char c; } __Pyx_pad_int;
   29486             : typedef struct { long x; char c; } __Pyx_pad_long;
   29487             : typedef struct { float x; char c; } __Pyx_pad_float;
   29488             : typedef struct { double x; char c; } __Pyx_pad_double;
   29489             : typedef struct { long double x; char c; } __Pyx_pad_longdouble;
   29490             : typedef struct { void *x; char c; } __Pyx_pad_void_p;
   29491             : #ifdef HAVE_LONG_LONG
   29492             : typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong;
   29493             : #endif
   29494         423 : static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, int is_complex) {
   29495         423 :   CYTHON_UNUSED_VAR(is_complex);
   29496         423 :   switch (ch) {
   29497             :     case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
   29498           0 :     case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short);
   29499             :     case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int);
   29500             :     case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long);
   29501             : #ifdef HAVE_LONG_LONG
   29502             :     case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG);
   29503             : #endif
   29504             :     case 'f': return sizeof(__Pyx_pad_float) - sizeof(float);
   29505             :     case 'd': return sizeof(__Pyx_pad_double) - sizeof(double);
   29506           0 :     case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double);
   29507             :     case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*);
   29508           0 :     default:
   29509           0 :       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
   29510           0 :       return 0;
   29511             :     }
   29512             : }
   29513         423 : static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {
   29514         423 :   switch (ch) {
   29515             :     case 'c':
   29516             :         return 'H';
   29517         141 :     case 'b': case 'h': case 'i':
   29518             :     case 'l': case 'q': case 's': case 'p':
   29519         141 :         return 'I';
   29520           0 :     case '?': case 'B': case 'H': case 'I': case 'L': case 'Q':
   29521           0 :         return 'U';
   29522         282 :     case 'f': case 'd': case 'g':
   29523         282 :         return (is_complex ? 'C' : 'R');
   29524           0 :     case 'O':
   29525           0 :         return 'O';
   29526           0 :     case 'P':
   29527           0 :         return 'P';
   29528           0 :     default: {
   29529           0 :       __Pyx_BufFmt_RaiseUnexpectedChar(ch);
   29530           0 :       return 0;
   29531             :     }
   29532             :   }
   29533             : }
   29534           0 : static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) {
   29535           0 :   if (ctx->head == NULL || ctx->head->field == &ctx->root) {
   29536           0 :     const char* expected;
   29537           0 :     const char* quote;
   29538           0 :     if (ctx->head == NULL) {
   29539             :       expected = "end";
   29540             :       quote = "";
   29541             :     } else {
   29542           0 :       expected = ctx->head->field->type->name;
   29543           0 :       quote = "'";
   29544             :     }
   29545           0 :     PyErr_Format(PyExc_ValueError,
   29546             :                  "Buffer dtype mismatch, expected %s%s%s but got %s",
   29547             :                  quote, expected, quote,
   29548           0 :                  __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex));
   29549             :   } else {
   29550           0 :     __Pyx_StructField* field = ctx->head->field;
   29551           0 :     __Pyx_StructField* parent = (ctx->head - 1)->field;
   29552           0 :     PyErr_Format(PyExc_ValueError,
   29553             :                  "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'",
   29554           0 :                  field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex),
   29555           0 :                  parent->type->name, field->name);
   29556             :   }
   29557           0 : }
   29558         846 : static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
   29559         846 :   char group;
   29560         846 :   size_t size, offset, arraysize = 1;
   29561         846 :   if (ctx->enc_type == 0) return 0;
   29562         423 :   if (ctx->head->field->type->arraysize[0]) {
   29563           0 :     int i, ndim = 0;
   29564           0 :     if (ctx->enc_type == 's' || ctx->enc_type == 'p') {
   29565           0 :         ctx->is_valid_array = ctx->head->field->type->ndim == 1;
   29566           0 :         ndim = 1;
   29567           0 :         if (ctx->enc_count != ctx->head->field->type->arraysize[0]) {
   29568           0 :             PyErr_Format(PyExc_ValueError,
   29569             :                          "Expected a dimension of size %zu, got %zu",
   29570             :                          ctx->head->field->type->arraysize[0], ctx->enc_count);
   29571           0 :             return -1;
   29572             :         }
   29573             :     }
   29574           0 :     if (!ctx->is_valid_array) {
   29575           0 :       PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d",
   29576             :                    ctx->head->field->type->ndim, ndim);
   29577           0 :       return -1;
   29578             :     }
   29579           0 :     for (i = 0; i < ctx->head->field->type->ndim; i++) {
   29580           0 :       arraysize *= ctx->head->field->type->arraysize[i];
   29581             :     }
   29582           0 :     ctx->is_valid_array = 0;
   29583           0 :     ctx->enc_count = 1;
   29584             :   }
   29585         423 :   group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);
   29586         423 :   do {
   29587         423 :     __Pyx_StructField* field = ctx->head->field;
   29588         423 :     __Pyx_TypeInfo* type = field->type;
   29589         423 :     if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') {
   29590         423 :       size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex);
   29591             :     } else {
   29592           0 :       size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex);
   29593             :     }
   29594         423 :     if (ctx->enc_packmode == '@') {
   29595         423 :       size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex);
   29596         423 :       size_t align_mod_offset;
   29597         423 :       if (align_at == 0) return -1;
   29598         423 :       align_mod_offset = ctx->fmt_offset % align_at;
   29599         423 :       if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset;
   29600         423 :       if (ctx->struct_alignment == 0)
   29601         423 :           ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type,
   29602             :                                                                  ctx->is_complex);
   29603             :     }
   29604         423 :     if (type->size != size || type->typegroup != group) {
   29605           0 :       if (type->typegroup == 'C' && type->fields != NULL) {
   29606           0 :         size_t parent_offset = ctx->head->parent_offset + field->offset;
   29607           0 :         ++ctx->head;
   29608           0 :         ctx->head->field = type->fields;
   29609           0 :         ctx->head->parent_offset = parent_offset;
   29610           0 :         continue;
   29611             :       }
   29612           0 :       if ((type->typegroup == 'H' || group == 'H') && type->size == size) {
   29613             :       } else {
   29614           0 :           __Pyx_BufFmt_RaiseExpected(ctx);
   29615           0 :           return -1;
   29616             :       }
   29617             :     }
   29618         423 :     offset = ctx->head->parent_offset + field->offset;
   29619         423 :     if (ctx->fmt_offset != offset) {
   29620           0 :       PyErr_Format(PyExc_ValueError,
   29621             :                    "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected",
   29622             :                    (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset);
   29623           0 :       return -1;
   29624             :     }
   29625         423 :     ctx->fmt_offset += size;
   29626         423 :     if (arraysize)
   29627         423 :       ctx->fmt_offset += (arraysize - 1) * size;
   29628         423 :     --ctx->enc_count;
   29629         423 :     while (1) {
   29630         423 :       if (field == &ctx->root) {
   29631         423 :         ctx->head = NULL;
   29632         423 :         if (ctx->enc_count != 0) {
   29633           0 :           __Pyx_BufFmt_RaiseExpected(ctx);
   29634           0 :           return -1;
   29635             :         }
   29636             :         break;
   29637             :       }
   29638           0 :       ctx->head->field = ++field;
   29639           0 :       if (field->type == NULL) {
   29640           0 :         --ctx->head;
   29641           0 :         field = ctx->head->field;
   29642           0 :         continue;
   29643           0 :       } else if (field->type->typegroup == 'S') {
   29644           0 :         size_t parent_offset = ctx->head->parent_offset + field->offset;
   29645           0 :         if (field->type->fields->type == NULL) continue;
   29646           0 :         field = field->type->fields;
   29647           0 :         ++ctx->head;
   29648           0 :         ctx->head->field = field;
   29649           0 :         ctx->head->parent_offset = parent_offset;
   29650           0 :         break;
   29651             :       } else {
   29652             :         break;
   29653             :       }
   29654             :     }
   29655         423 :   } while (ctx->enc_count);
   29656         423 :   ctx->enc_type = 0;
   29657         423 :   ctx->is_complex = 0;
   29658         423 :   return 0;
   29659             : }
   29660             : static int
   29661           0 : __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp)
   29662             : {
   29663           0 :     const char *ts = *tsp;
   29664           0 :     int i = 0, number, ndim;
   29665           0 :     ++ts;
   29666           0 :     if (ctx->new_count != 1) {
   29667           0 :         PyErr_SetString(PyExc_ValueError,
   29668             :                         "Cannot handle repeated arrays in format string");
   29669           0 :         return -1;
   29670             :     }
   29671           0 :     if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return -1;
   29672           0 :     ndim = ctx->head->field->type->ndim;
   29673           0 :     while (*ts && *ts != ')') {
   29674           0 :         switch (*ts) {
   29675           0 :             case ' ': case '\f': case '\r': case '\n': case '\t': case '\v':  continue;
   29676           0 :             default:  break;
   29677             :         }
   29678           0 :         number = __Pyx_BufFmt_ExpectNumber(&ts);
   29679           0 :         if (number == -1) return -1;
   29680           0 :         if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i]) {
   29681           0 :             PyErr_Format(PyExc_ValueError,
   29682             :                         "Expected a dimension of size %zu, got %d",
   29683             :                         ctx->head->field->type->arraysize[i], number);
   29684           0 :             return -1;
   29685             :         }
   29686           0 :         if (*ts != ',' && *ts != ')') {
   29687           0 :             PyErr_Format(PyExc_ValueError,
   29688             :                                 "Expected a comma in format string, got '%c'", *ts);
   29689           0 :             return -1;
   29690             :         }
   29691           0 :         if (*ts == ',') ts++;
   29692           0 :         i++;
   29693             :     }
   29694           0 :     if (i != ndim) {
   29695           0 :         PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d",
   29696           0 :                             ctx->head->field->type->ndim, i);
   29697           0 :         return -1;
   29698             :     }
   29699           0 :     if (!*ts) {
   29700           0 :         PyErr_SetString(PyExc_ValueError,
   29701             :                         "Unexpected end of format string, expected ')'");
   29702           0 :         return -1;
   29703             :     }
   29704           0 :     ctx->is_valid_array = 1;
   29705           0 :     ctx->new_count = 1;
   29706           0 :     *tsp = ++ts;
   29707           0 :     return 0;
   29708             : }
   29709         423 : static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) {
   29710         423 :   int got_Z = 0;
   29711         846 :   while (1) {
   29712         846 :     switch(*ts) {
   29713         423 :       case 0:
   29714         423 :         if (ctx->enc_type != 0 && ctx->head == NULL) {
   29715           0 :           __Pyx_BufFmt_RaiseExpected(ctx);
   29716           0 :           return NULL;
   29717             :         }
   29718         423 :         if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
   29719         423 :         if (ctx->head != NULL) {
   29720           0 :           __Pyx_BufFmt_RaiseExpected(ctx);
   29721           0 :           return NULL;
   29722             :         }
   29723             :         return ts;
   29724           0 :       case ' ':
   29725             :       case '\r':
   29726             :       case '\n':
   29727           0 :         ++ts;
   29728           0 :         break;
   29729             :       case '<':
   29730           0 :         if (!__Pyx_Is_Little_Endian()) {
   29731             :           PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler");
   29732             :           return NULL;
   29733             :         }
   29734           0 :         ctx->new_packmode = '=';
   29735           0 :         ++ts;
   29736           0 :         break;
   29737             :       case '>':
   29738             :       case '!':
   29739           0 :         if (__Pyx_Is_Little_Endian()) {
   29740           0 :           PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler");
   29741           0 :           return NULL;
   29742             :         }
   29743             :         ctx->new_packmode = '=';
   29744             :         ++ts;
   29745             :         break;
   29746           0 :       case '=':
   29747             :       case '@':
   29748             :       case '^':
   29749           0 :         ctx->new_packmode = *ts++;
   29750           0 :         break;
   29751           0 :       case 'T':
   29752             :         {
   29753           0 :           const char* ts_after_sub;
   29754           0 :           size_t i, struct_count = ctx->new_count;
   29755           0 :           size_t struct_alignment = ctx->struct_alignment;
   29756           0 :           ctx->new_count = 1;
   29757           0 :           ++ts;
   29758           0 :           if (*ts != '{') {
   29759           0 :             PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'");
   29760           0 :             return NULL;
   29761             :           }
   29762           0 :           if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
   29763           0 :           ctx->enc_type = 0;
   29764           0 :           ctx->enc_count = 0;
   29765           0 :           ctx->struct_alignment = 0;
   29766           0 :           ++ts;
   29767           0 :           ts_after_sub = ts;
   29768           0 :           for (i = 0; i != struct_count; ++i) {
   29769           0 :             ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts);
   29770           0 :             if (!ts_after_sub) return NULL;
   29771             :           }
   29772           0 :           ts = ts_after_sub;
   29773           0 :           if (struct_alignment) ctx->struct_alignment = struct_alignment;
   29774             :         }
   29775             :         break;
   29776           0 :       case '}':
   29777             :         {
   29778           0 :           size_t alignment = ctx->struct_alignment;
   29779           0 :           ++ts;
   29780           0 :           if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
   29781           0 :           ctx->enc_type = 0;
   29782           0 :           if (alignment && ctx->fmt_offset % alignment) {
   29783           0 :             ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment);
   29784             :           }
   29785             :         }
   29786             :         return ts;
   29787           0 :       case 'x':
   29788           0 :         if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
   29789           0 :         ctx->fmt_offset += ctx->new_count;
   29790           0 :         ctx->new_count = 1;
   29791           0 :         ctx->enc_count = 0;
   29792           0 :         ctx->enc_type = 0;
   29793           0 :         ctx->enc_packmode = ctx->new_packmode;
   29794           0 :         ++ts;
   29795           0 :         break;
   29796          80 :       case 'Z':
   29797          80 :         got_Z = 1;
   29798          80 :         ++ts;
   29799          80 :         if (*ts != 'f' && *ts != 'd' && *ts != 'g') {
   29800           0 :           __Pyx_BufFmt_RaiseUnexpectedChar('Z');
   29801           0 :           return NULL;
   29802             :         }
   29803         423 :         CYTHON_FALLTHROUGH;
   29804             :       case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I':
   29805             :       case 'l': case 'L': case 'q': case 'Q':
   29806             :       case 'f': case 'd': case 'g':
   29807             :       case 'O': case 'p':
   29808         423 :         if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) &&
   29809           0 :             (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) {
   29810           0 :           ctx->enc_count += ctx->new_count;
   29811           0 :           ctx->new_count = 1;
   29812           0 :           got_Z = 0;
   29813           0 :           ++ts;
   29814           0 :           break;
   29815             :         }
   29816         423 :         CYTHON_FALLTHROUGH;
   29817             :       case 's':
   29818         423 :         if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
   29819         423 :         ctx->enc_count = ctx->new_count;
   29820         423 :         ctx->enc_packmode = ctx->new_packmode;
   29821         423 :         ctx->enc_type = *ts;
   29822         423 :         ctx->is_complex = got_Z;
   29823         423 :         ++ts;
   29824         423 :         ctx->new_count = 1;
   29825         423 :         got_Z = 0;
   29826         423 :         break;
   29827           0 :       case ':':
   29828           0 :         ++ts;
   29829           0 :         while(*ts != ':') ++ts;
   29830           0 :         ++ts;
   29831           0 :         break;
   29832           0 :       case '(':
   29833           0 :         if (__pyx_buffmt_parse_array(ctx, &ts) < 0) return NULL;
   29834             :         break;
   29835           0 :       default:
   29836             :         {
   29837           0 :           int number = __Pyx_BufFmt_ExpectNumber(&ts);
   29838           0 :           if (number == -1) return NULL;
   29839           0 :           ctx->new_count = (size_t)number;
   29840             :         }
   29841             :     }
   29842             :   }
   29843             : }
   29844             : 
   29845             : /* BufferGetAndValidate */
   29846         282 :   static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) {
   29847         282 :   if (unlikely(info->buf == NULL)) return;
   29848         282 :   if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL;
   29849         282 :   __Pyx_ReleaseBuffer(info);
   29850             : }
   29851           0 : static void __Pyx_ZeroBuffer(Py_buffer* buf) {
   29852           0 :   buf->buf = NULL;
   29853           0 :   buf->obj = NULL;
   29854           0 :   buf->strides = __Pyx_zeros;
   29855           0 :   buf->shape = __Pyx_zeros;
   29856           0 :   buf->suboffsets = __Pyx_minusones;
   29857             : }
   29858         282 : static int __Pyx__GetBufferAndValidate(
   29859             :         Py_buffer* buf, PyObject* obj,  __Pyx_TypeInfo* dtype, int flags,
   29860             :         int nd, int cast, __Pyx_BufFmt_StackElem* stack)
   29861             : {
   29862         282 :   buf->buf = NULL;
   29863         282 :   if (unlikely(__Pyx_GetBuffer(obj, buf, flags) == -1)) {
   29864           0 :     __Pyx_ZeroBuffer(buf);
   29865           0 :     return -1;
   29866             :   }
   29867         282 :   if (unlikely(buf->ndim != nd)) {
   29868           0 :     PyErr_Format(PyExc_ValueError,
   29869             :                  "Buffer has wrong number of dimensions (expected %d, got %d)",
   29870             :                  nd, buf->ndim);
   29871           0 :     goto fail;
   29872             :   }
   29873         282 :   if (!cast) {
   29874         282 :     __Pyx_BufFmt_Context ctx;
   29875         282 :     __Pyx_BufFmt_Init(&ctx, stack, dtype);
   29876         282 :     if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail;
   29877             :   }
   29878         282 :   if (unlikely((size_t)buf->itemsize != dtype->size)) {
   29879           0 :     PyErr_Format(PyExc_ValueError,
   29880             :       "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "d byte%s) does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "d byte%s)",
   29881             :       buf->itemsize, (buf->itemsize > 1) ? "s" : "",
   29882             :       dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : "");
   29883           0 :     goto fail;
   29884             :   }
   29885         282 :   if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones;
   29886             :   return 0;
   29887           0 : fail:;
   29888           0 :   __Pyx_SafeReleaseBuffer(buf);
   29889           0 :   return -1;
   29890             : }
   29891             : 
   29892             : /* WriteUnraisableException */
   29893           0 :   static void __Pyx_WriteUnraisable(const char *name, int clineno,
   29894             :                                   int lineno, const char *filename,
   29895             :                                   int full_traceback, int nogil) {
   29896           0 :     PyObject *old_exc, *old_val, *old_tb;
   29897           0 :     PyObject *ctx;
   29898           0 :     __Pyx_PyThreadState_declare
   29899             : #ifdef WITH_THREAD
   29900           0 :     PyGILState_STATE state;
   29901           0 :     if (nogil)
   29902           0 :         state = PyGILState_Ensure();
   29903             :     else state = (PyGILState_STATE)0;
   29904             : #endif
   29905           0 :     CYTHON_UNUSED_VAR(clineno);
   29906           0 :     CYTHON_UNUSED_VAR(lineno);
   29907           0 :     CYTHON_UNUSED_VAR(filename);
   29908           0 :     CYTHON_MAYBE_UNUSED_VAR(nogil);
   29909           0 :     __Pyx_PyThreadState_assign
   29910           0 :     __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
   29911           0 :     if (full_traceback) {
   29912           0 :         Py_XINCREF(old_exc);
   29913           0 :         Py_XINCREF(old_val);
   29914           0 :         Py_XINCREF(old_tb);
   29915           0 :         __Pyx_ErrRestore(old_exc, old_val, old_tb);
   29916           0 :         PyErr_PrintEx(0);
   29917             :     }
   29918             :     #if PY_MAJOR_VERSION < 3
   29919             :     ctx = PyString_FromString(name);
   29920             :     #else
   29921           0 :     ctx = PyUnicode_FromString(name);
   29922             :     #endif
   29923           0 :     __Pyx_ErrRestore(old_exc, old_val, old_tb);
   29924           0 :     if (!ctx) {
   29925           0 :         PyErr_WriteUnraisable(Py_None);
   29926             :     } else {
   29927           0 :         PyErr_WriteUnraisable(ctx);
   29928           0 :         Py_DECREF(ctx);
   29929             :     }
   29930             : #ifdef WITH_THREAD
   29931           0 :     if (nogil)
   29932           0 :         PyGILState_Release(state);
   29933             : #endif
   29934           0 : }
   29935             : 
   29936             : /* PyObject_GenericGetAttrNoDict */
   29937             :   #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
   29938             : static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
   29939             :     __Pyx_TypeName type_name = __Pyx_PyType_GetName(tp);
   29940             :     PyErr_Format(PyExc_AttributeError,
   29941             : #if PY_MAJOR_VERSION >= 3
   29942             :                  "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
   29943             :                  type_name, attr_name);
   29944             : #else
   29945             :                  "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
   29946             :                  type_name, PyString_AS_STRING(attr_name));
   29947             : #endif
   29948             :     __Pyx_DECREF_TypeName(type_name);
   29949             :     return NULL;
   29950             : }
   29951             : static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
   29952             :     PyObject *descr;
   29953             :     PyTypeObject *tp = Py_TYPE(obj);
   29954             :     if (unlikely(!PyString_Check(attr_name))) {
   29955             :         return PyObject_GenericGetAttr(obj, attr_name);
   29956             :     }
   29957             :     assert(!tp->tp_dictoffset);
   29958             :     descr = _PyType_Lookup(tp, attr_name);
   29959             :     if (unlikely(!descr)) {
   29960             :         return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
   29961             :     }
   29962             :     Py_INCREF(descr);
   29963             :     #if PY_MAJOR_VERSION < 3
   29964             :     if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
   29965             :     #endif
   29966             :     {
   29967             :         descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
   29968             :         if (unlikely(f)) {
   29969             :             PyObject *res = f(descr, obj, (PyObject *)tp);
   29970             :             Py_DECREF(descr);
   29971             :             return res;
   29972             :         }
   29973             :     }
   29974             :     return descr;
   29975             : }
   29976             : #endif
   29977             : 
   29978             : /* PyObject_GenericGetAttr */
   29979             :   #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
   29980             : static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
   29981             :     if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
   29982             :         return PyObject_GenericGetAttr(obj, attr_name);
   29983             :     }
   29984             :     return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
   29985             : }
   29986             : #endif
   29987             : 
   29988             : /* FixUpExtensionType */
   29989             :   #if CYTHON_USE_TYPE_SPECS
   29990             : static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
   29991             : #if PY_VERSION_HEX > 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
   29992             :     CYTHON_UNUSED_VAR(spec);
   29993             :     CYTHON_UNUSED_VAR(type);
   29994             : #else
   29995             :     const PyType_Slot *slot = spec->slots;
   29996             :     while (slot && slot->slot && slot->slot != Py_tp_members)
   29997             :         slot++;
   29998             :     if (slot && slot->slot == Py_tp_members) {
   29999             :         int changed = 0;
   30000             : #if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON)
   30001             :         const
   30002             : #endif
   30003             :             PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
   30004             :         while (memb && memb->name) {
   30005             :             if (memb->name[0] == '_' && memb->name[1] == '_') {
   30006             : #if PY_VERSION_HEX < 0x030900b1
   30007             :                 if (strcmp(memb->name, "__weaklistoffset__") == 0) {
   30008             :                     assert(memb->type == T_PYSSIZET);
   30009             :                     assert(memb->flags == READONLY);
   30010             :                     type->tp_weaklistoffset = memb->offset;
   30011             :                     changed = 1;
   30012             :                 }
   30013             :                 else if (strcmp(memb->name, "__dictoffset__") == 0) {
   30014             :                     assert(memb->type == T_PYSSIZET);
   30015             :                     assert(memb->flags == READONLY);
   30016             :                     type->tp_dictoffset = memb->offset;
   30017             :                     changed = 1;
   30018             :                 }
   30019             : #if CYTHON_METH_FASTCALL
   30020             :                 else if (strcmp(memb->name, "__vectorcalloffset__") == 0) {
   30021             :                     assert(memb->type == T_PYSSIZET);
   30022             :                     assert(memb->flags == READONLY);
   30023             : #if PY_VERSION_HEX >= 0x030800b4
   30024             :                     type->tp_vectorcall_offset = memb->offset;
   30025             : #else
   30026             :                     type->tp_print = (printfunc) memb->offset;
   30027             : #endif
   30028             :                     changed = 1;
   30029             :                 }
   30030             : #endif
   30031             : #else
   30032             :                 if ((0));
   30033             : #endif
   30034             : #if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON
   30035             :                 else if (strcmp(memb->name, "__module__") == 0) {
   30036             :                     PyObject *descr;
   30037             :                     assert(memb->type == T_OBJECT);
   30038             :                     assert(memb->flags == 0 || memb->flags == READONLY);
   30039             :                     descr = PyDescr_NewMember(type, memb);
   30040             :                     if (unlikely(!descr))
   30041             :                         return -1;
   30042             :                     if (unlikely(PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr) < 0)) {
   30043             :                         Py_DECREF(descr);
   30044             :                         return -1;
   30045             :                     }
   30046             :                     Py_DECREF(descr);
   30047             :                     changed = 1;
   30048             :                 }
   30049             : #endif
   30050             :             }
   30051             :             memb++;
   30052             :         }
   30053             :         if (changed)
   30054             :             PyType_Modified(type);
   30055             :     }
   30056             : #endif
   30057             :     return 0;
   30058             : }
   30059             : #endif
   30060             : 
   30061             : /* PyObjectCallNoArg */
   30062             :   static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
   30063             :     PyObject *arg[2] = {NULL, NULL};
   30064             :     return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
   30065             : }
   30066             : 
   30067             : /* PyObjectGetMethod */
   30068             :   static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
   30069             :     PyObject *attr;
   30070             : #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
   30071             :     __Pyx_TypeName type_name;
   30072             :     PyTypeObject *tp = Py_TYPE(obj);
   30073             :     PyObject *descr;
   30074             :     descrgetfunc f = NULL;
   30075             :     PyObject **dictptr, *dict;
   30076             :     int meth_found = 0;
   30077             :     assert (*method == NULL);
   30078             :     if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
   30079             :         attr = __Pyx_PyObject_GetAttrStr(obj, name);
   30080             :         goto try_unpack;
   30081             :     }
   30082             :     if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
   30083             :         return 0;
   30084             :     }
   30085             :     descr = _PyType_Lookup(tp, name);
   30086             :     if (likely(descr != NULL)) {
   30087             :         Py_INCREF(descr);
   30088             : #if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR
   30089             :         if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR))
   30090             : #elif PY_MAJOR_VERSION >= 3
   30091             :         #ifdef __Pyx_CyFunction_USED
   30092             :         if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
   30093             :         #else
   30094             :         if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type)))
   30095             :         #endif
   30096             : #else
   30097             :         #ifdef __Pyx_CyFunction_USED
   30098             :         if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
   30099             :         #else
   30100             :         if (likely(PyFunction_Check(descr)))
   30101             :         #endif
   30102             : #endif
   30103             :         {
   30104             :             meth_found = 1;
   30105             :         } else {
   30106             :             f = Py_TYPE(descr)->tp_descr_get;
   30107             :             if (f != NULL && PyDescr_IsData(descr)) {
   30108             :                 attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
   30109             :                 Py_DECREF(descr);
   30110             :                 goto try_unpack;
   30111             :             }
   30112             :         }
   30113             :     }
   30114             :     dictptr = _PyObject_GetDictPtr(obj);
   30115             :     if (dictptr != NULL && (dict = *dictptr) != NULL) {
   30116             :         Py_INCREF(dict);
   30117             :         attr = __Pyx_PyDict_GetItemStr(dict, name);
   30118             :         if (attr != NULL) {
   30119             :             Py_INCREF(attr);
   30120             :             Py_DECREF(dict);
   30121             :             Py_XDECREF(descr);
   30122             :             goto try_unpack;
   30123             :         }
   30124             :         Py_DECREF(dict);
   30125             :     }
   30126             :     if (meth_found) {
   30127             :         *method = descr;
   30128             :         return 1;
   30129             :     }
   30130             :     if (f != NULL) {
   30131             :         attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
   30132             :         Py_DECREF(descr);
   30133             :         goto try_unpack;
   30134             :     }
   30135             :     if (likely(descr != NULL)) {
   30136             :         *method = descr;
   30137             :         return 0;
   30138             :     }
   30139             :     type_name = __Pyx_PyType_GetName(tp);
   30140             :     PyErr_Format(PyExc_AttributeError,
   30141             : #if PY_MAJOR_VERSION >= 3
   30142             :                  "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
   30143             :                  type_name, name);
   30144             : #else
   30145             :                  "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
   30146             :                  type_name, PyString_AS_STRING(name));
   30147             : #endif
   30148             :     __Pyx_DECREF_TypeName(type_name);
   30149             :     return 0;
   30150             : #else
   30151             :     attr = __Pyx_PyObject_GetAttrStr(obj, name);
   30152             :     goto try_unpack;
   30153             : #endif
   30154             : try_unpack:
   30155             : #if CYTHON_UNPACK_METHODS
   30156             :     if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
   30157             :         PyObject *function = PyMethod_GET_FUNCTION(attr);
   30158             :         Py_INCREF(function);
   30159             :         Py_DECREF(attr);
   30160             :         *method = function;
   30161             :         return 1;
   30162             :     }
   30163             : #endif
   30164             :     *method = attr;
   30165             :     return 0;
   30166             : }
   30167             : 
   30168             : /* PyObjectCallMethod0 */
   30169             :   static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
   30170             :     PyObject *method = NULL, *result = NULL;
   30171             :     int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
   30172             :     if (likely(is_method)) {
   30173             :         result = __Pyx_PyObject_CallOneArg(method, obj);
   30174             :         Py_DECREF(method);
   30175             :         return result;
   30176             :     }
   30177             :     if (unlikely(!method)) goto bad;
   30178             :     result = __Pyx_PyObject_CallNoArg(method);
   30179             :     Py_DECREF(method);
   30180             : bad:
   30181             :     return result;
   30182             : }
   30183             : 
   30184             : /* ValidateBasesTuple */
   30185             :   #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
   30186           0 : static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) {
   30187           0 :     Py_ssize_t i, n;
   30188             : #if CYTHON_ASSUME_SAFE_MACROS
   30189           0 :     n = PyTuple_GET_SIZE(bases);
   30190             : #else
   30191             :     n = PyTuple_Size(bases);
   30192             :     if (n < 0) return -1;
   30193             : #endif
   30194           0 :     for (i = 1; i < n; i++)
   30195             :     {
   30196             : #if CYTHON_AVOID_BORROWED_REFS
   30197             :         PyObject *b0 = PySequence_GetItem(bases, i);
   30198             :         if (!b0) return -1;
   30199             : #elif CYTHON_ASSUME_SAFE_MACROS
   30200           0 :         PyObject *b0 = PyTuple_GET_ITEM(bases, i);
   30201             : #else
   30202             :         PyObject *b0 = PyTuple_GetItem(bases, i);
   30203             :         if (!b0) return -1;
   30204             : #endif
   30205           0 :         PyTypeObject *b;
   30206             : #if PY_MAJOR_VERSION < 3
   30207             :         if (PyClass_Check(b0))
   30208             :         {
   30209             :             PyErr_Format(PyExc_TypeError, "base class '%.200s' is an old-style class",
   30210             :                          PyString_AS_STRING(((PyClassObject*)b0)->cl_name));
   30211             : #if CYTHON_AVOID_BORROWED_REFS
   30212             :             Py_DECREF(b0);
   30213             : #endif
   30214             :             return -1;
   30215             :         }
   30216             : #endif
   30217           0 :         b = (PyTypeObject*) b0;
   30218           0 :         if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE))
   30219             :         {
   30220           0 :             __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
   30221           0 :             PyErr_Format(PyExc_TypeError,
   30222             :                 "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name);
   30223           0 :             __Pyx_DECREF_TypeName(b_name);
   30224             : #if CYTHON_AVOID_BORROWED_REFS
   30225             :             Py_DECREF(b0);
   30226             : #endif
   30227           0 :             return -1;
   30228             :         }
   30229           0 :         if (dictoffset == 0)
   30230             :         {
   30231           0 :             Py_ssize_t b_dictoffset = 0;
   30232             : #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
   30233           0 :             b_dictoffset = b->tp_dictoffset;
   30234             : #else
   30235             :             PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__");
   30236             :             if (!py_b_dictoffset) goto dictoffset_return;
   30237             :             b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset);
   30238             :             Py_DECREF(py_b_dictoffset);
   30239             :             if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return;
   30240             : #endif
   30241           0 :             if (b_dictoffset) {
   30242             :                 {
   30243           0 :                     __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
   30244           0 :                     PyErr_Format(PyExc_TypeError,
   30245             :                         "extension type '%.200s' has no __dict__ slot, "
   30246             :                         "but base type '" __Pyx_FMT_TYPENAME "' has: "
   30247             :                         "either add 'cdef dict __dict__' to the extension type "
   30248             :                         "or add '__slots__ = [...]' to the base type",
   30249             :                         type_name, b_name);
   30250           0 :                     __Pyx_DECREF_TypeName(b_name);
   30251             :                 }
   30252             : #if !(CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY)
   30253             :               dictoffset_return:
   30254             : #endif
   30255             : #if CYTHON_AVOID_BORROWED_REFS
   30256             :                 Py_DECREF(b0);
   30257             : #endif
   30258           0 :                 return -1;
   30259             :             }
   30260             :         }
   30261             : #if CYTHON_AVOID_BORROWED_REFS
   30262             :         Py_DECREF(b0);
   30263             : #endif
   30264             :     }
   30265             :     return 0;
   30266             : }
   30267             : #endif
   30268             : 
   30269             : /* PyType_Ready */
   30270           4 :   static int __Pyx_PyType_Ready(PyTypeObject *t) {
   30271             : #if CYTHON_USE_TYPE_SPECS || !(CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API) || defined(PYSTON_MAJOR_VERSION)
   30272             :     (void)__Pyx_PyObject_CallMethod0;
   30273             : #if CYTHON_USE_TYPE_SPECS
   30274             :     (void)__Pyx_validate_bases_tuple;
   30275             : #endif
   30276             :     return PyType_Ready(t);
   30277             : #else
   30278           4 :     int r;
   30279           4 :     PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
   30280           4 :     if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1))
   30281             :         return -1;
   30282             : #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
   30283             :     {
   30284           4 :         int gc_was_enabled;
   30285             :     #if PY_VERSION_HEX >= 0x030A00b1
   30286           4 :         gc_was_enabled = PyGC_Disable();
   30287           4 :         (void)__Pyx_PyObject_CallMethod0;
   30288             :     #else
   30289             :         PyObject *ret, *py_status;
   30290             :         PyObject *gc = NULL;
   30291             :         #if PY_VERSION_HEX >= 0x030700a1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400)
   30292             :         gc = PyImport_GetModule(__pyx_kp_u_gc);
   30293             :         #endif
   30294             :         if (unlikely(!gc)) gc = PyImport_Import(__pyx_kp_u_gc);
   30295             :         if (unlikely(!gc)) return -1;
   30296             :         py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_isenabled);
   30297             :         if (unlikely(!py_status)) {
   30298             :             Py_DECREF(gc);
   30299             :             return -1;
   30300             :         }
   30301             :         gc_was_enabled = __Pyx_PyObject_IsTrue(py_status);
   30302             :         Py_DECREF(py_status);
   30303             :         if (gc_was_enabled > 0) {
   30304             :             ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_disable);
   30305             :             if (unlikely(!ret)) {
   30306             :                 Py_DECREF(gc);
   30307             :                 return -1;
   30308             :             }
   30309             :             Py_DECREF(ret);
   30310             :         } else if (unlikely(gc_was_enabled == -1)) {
   30311             :             Py_DECREF(gc);
   30312             :             return -1;
   30313             :         }
   30314             :     #endif
   30315           4 :         t->tp_flags |= Py_TPFLAGS_HEAPTYPE;
   30316             : #if PY_VERSION_HEX >= 0x030A0000
   30317           4 :         t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE;
   30318             : #endif
   30319             : #else
   30320             :         (void)__Pyx_PyObject_CallMethod0;
   30321             : #endif
   30322           4 :     r = PyType_Ready(t);
   30323             : #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
   30324           4 :         t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE;
   30325             :     #if PY_VERSION_HEX >= 0x030A00b1
   30326           4 :         if (gc_was_enabled)
   30327           4 :             PyGC_Enable();
   30328             :     #else
   30329             :         if (gc_was_enabled) {
   30330             :             PyObject *tp, *v, *tb;
   30331             :             PyErr_Fetch(&tp, &v, &tb);
   30332             :             ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_enable);
   30333             :             if (likely(ret || r == -1)) {
   30334             :                 Py_XDECREF(ret);
   30335             :                 PyErr_Restore(tp, v, tb);
   30336             :             } else {
   30337             :                 Py_XDECREF(tp);
   30338             :                 Py_XDECREF(v);
   30339             :                 Py_XDECREF(tb);
   30340             :                 r = -1;
   30341             :             }
   30342             :         }
   30343             :         Py_DECREF(gc);
   30344             :     #endif
   30345             :     }
   30346             : #endif
   30347             :     return r;
   30348             : #endif
   30349             : }
   30350             : 
   30351             : /* SetVTable */
   30352           3 :   static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) {
   30353           3 :     PyObject *ob = PyCapsule_New(vtable, 0, 0);
   30354           3 :     if (unlikely(!ob))
   30355           0 :         goto bad;
   30356             : #if CYTHON_COMPILING_IN_LIMITED_API
   30357             :     if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_n_s_pyx_vtable, ob) < 0))
   30358             : #else
   30359           3 :     if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_n_s_pyx_vtable, ob) < 0))
   30360             : #endif
   30361           0 :         goto bad;
   30362           3 :     Py_DECREF(ob);
   30363             :     return 0;
   30364           0 : bad:
   30365           0 :     Py_XDECREF(ob);
   30366           0 :     return -1;
   30367             : }
   30368             : 
   30369             : /* GetVTable */
   30370           0 :   static void* __Pyx_GetVtable(PyTypeObject *type) {
   30371           0 :     void* ptr;
   30372             : #if CYTHON_COMPILING_IN_LIMITED_API
   30373             :     PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_n_s_pyx_vtable);
   30374             : #else
   30375           0 :     PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_n_s_pyx_vtable);
   30376             : #endif
   30377           0 :     if (!ob)
   30378           0 :         goto bad;
   30379           0 :     ptr = PyCapsule_GetPointer(ob, 0);
   30380           0 :     if (!ptr && !PyErr_Occurred())
   30381           0 :         PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
   30382           0 :     Py_DECREF(ob);
   30383             :     return ptr;
   30384           0 : bad:
   30385           0 :     Py_XDECREF(ob);
   30386           0 :     return NULL;
   30387             : }
   30388             : 
   30389             : /* MergeVTables */
   30390             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   30391           3 : static int __Pyx_MergeVtables(PyTypeObject *type) {
   30392           3 :     int i;
   30393           3 :     void** base_vtables;
   30394           3 :     __Pyx_TypeName tp_base_name;
   30395           3 :     __Pyx_TypeName base_name;
   30396           3 :     void* unknown = (void*)-1;
   30397           3 :     PyObject* bases = type->tp_bases;
   30398           3 :     int base_depth = 0;
   30399             :     {
   30400           3 :         PyTypeObject* base = type->tp_base;
   30401           7 :         while (base) {
   30402           4 :             base_depth += 1;
   30403           4 :             base = base->tp_base;
   30404             :         }
   30405             :     }
   30406           3 :     base_vtables = (void**) malloc(sizeof(void*) * (size_t)(base_depth + 1));
   30407           3 :     base_vtables[0] = unknown;
   30408           3 :     for (i = 1; i < PyTuple_GET_SIZE(bases); i++) {
   30409           0 :         void* base_vtable = __Pyx_GetVtable(((PyTypeObject*)PyTuple_GET_ITEM(bases, i)));
   30410           0 :         if (base_vtable != NULL) {
   30411           0 :             int j;
   30412           0 :             PyTypeObject* base = type->tp_base;
   30413           0 :             for (j = 0; j < base_depth; j++) {
   30414           0 :                 if (base_vtables[j] == unknown) {
   30415           0 :                     base_vtables[j] = __Pyx_GetVtable(base);
   30416           0 :                     base_vtables[j + 1] = unknown;
   30417             :                 }
   30418           0 :                 if (base_vtables[j] == base_vtable) {
   30419             :                     break;
   30420           0 :                 } else if (base_vtables[j] == NULL) {
   30421           0 :                     goto bad;
   30422             :                 }
   30423           0 :                 base = base->tp_base;
   30424             :             }
   30425             :         }
   30426             :     }
   30427           3 :     PyErr_Clear();
   30428           3 :     free(base_vtables);
   30429           3 :     return 0;
   30430           0 : bad:
   30431           0 :     tp_base_name = __Pyx_PyType_GetName(type->tp_base);
   30432           0 :     base_name = __Pyx_PyType_GetName((PyTypeObject*)PyTuple_GET_ITEM(bases, i));
   30433           0 :     PyErr_Format(PyExc_TypeError,
   30434             :         "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name);
   30435           0 :     __Pyx_DECREF_TypeName(tp_base_name);
   30436           0 :     __Pyx_DECREF_TypeName(base_name);
   30437           0 :     free(base_vtables);
   30438           0 :     return -1;
   30439             : }
   30440             : #endif
   30441             : 
   30442             : /* SetupReduce */
   30443             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   30444           2 : static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
   30445           2 :   int ret;
   30446           2 :   PyObject *name_attr;
   30447           2 :   name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_n_s_name_2);
   30448           2 :   if (likely(name_attr)) {
   30449           2 :       ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
   30450             :   } else {
   30451             :       ret = -1;
   30452             :   }
   30453           2 :   if (unlikely(ret < 0)) {
   30454           0 :       PyErr_Clear();
   30455           0 :       ret = 0;
   30456             :   }
   30457           2 :   Py_XDECREF(name_attr);
   30458           2 :   return ret;
   30459             : }
   30460           4 : static int __Pyx_setup_reduce(PyObject* type_obj) {
   30461           4 :     int ret = 0;
   30462           4 :     PyObject *object_reduce = NULL;
   30463           4 :     PyObject *object_getstate = NULL;
   30464           4 :     PyObject *object_reduce_ex = NULL;
   30465           4 :     PyObject *reduce = NULL;
   30466           4 :     PyObject *reduce_ex = NULL;
   30467           4 :     PyObject *reduce_cython = NULL;
   30468           4 :     PyObject *setstate = NULL;
   30469           4 :     PyObject *setstate_cython = NULL;
   30470           4 :     PyObject *getstate = NULL;
   30471             : #if CYTHON_USE_PYTYPE_LOOKUP
   30472           4 :     getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate);
   30473             : #else
   30474             :     getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate);
   30475             :     if (!getstate && PyErr_Occurred()) {
   30476             :         goto __PYX_BAD;
   30477             :     }
   30478             : #endif
   30479           4 :     if (getstate) {
   30480             : #if CYTHON_USE_PYTYPE_LOOKUP
   30481           4 :         object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate);
   30482             : #else
   30483             :         object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate);
   30484             :         if (!object_getstate && PyErr_Occurred()) {
   30485             :             goto __PYX_BAD;
   30486             :         }
   30487             : #endif
   30488           4 :         if (object_getstate != getstate) {
   30489           0 :             goto __PYX_GOOD;
   30490             :         }
   30491             :     }
   30492             : #if CYTHON_USE_PYTYPE_LOOKUP
   30493           4 :     object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
   30494             : #else
   30495             :     object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
   30496             : #endif
   30497           4 :     reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
   30498           4 :     if (reduce_ex == object_reduce_ex) {
   30499             : #if CYTHON_USE_PYTYPE_LOOKUP
   30500           4 :         object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
   30501             : #else
   30502             :         object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
   30503             : #endif
   30504           4 :         reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
   30505           4 :         if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
   30506           4 :             reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
   30507           4 :             if (likely(reduce_cython)) {
   30508           4 :                 ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
   30509           4 :                 ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
   30510           0 :             } else if (reduce == object_reduce || PyErr_Occurred()) {
   30511           0 :                 goto __PYX_BAD;
   30512             :             }
   30513           4 :             setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate);
   30514           4 :             if (!setstate) PyErr_Clear();
   30515           4 :             if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
   30516           4 :                 setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
   30517           4 :                 if (likely(setstate_cython)) {
   30518           4 :                     ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
   30519           4 :                     ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
   30520           0 :                 } else if (!setstate || PyErr_Occurred()) {
   30521           0 :                     goto __PYX_BAD;
   30522             :                 }
   30523             :             }
   30524           4 :             PyType_Modified((PyTypeObject*)type_obj);
   30525             :         }
   30526             :     }
   30527           4 :     goto __PYX_GOOD;
   30528           0 : __PYX_BAD:
   30529           0 :     if (!PyErr_Occurred()) {
   30530           0 :         __Pyx_TypeName type_obj_name =
   30531             :             __Pyx_PyType_GetName((PyTypeObject*)type_obj);
   30532           0 :         PyErr_Format(PyExc_RuntimeError,
   30533             :             "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name);
   30534             :         __Pyx_DECREF_TypeName(type_obj_name);
   30535             :     }
   30536             :     ret = -1;
   30537           4 : __PYX_GOOD:
   30538             : #if !CYTHON_USE_PYTYPE_LOOKUP
   30539             :     Py_XDECREF(object_reduce);
   30540             :     Py_XDECREF(object_reduce_ex);
   30541             :     Py_XDECREF(object_getstate);
   30542             :     Py_XDECREF(getstate);
   30543             : #endif
   30544           4 :     Py_XDECREF(reduce);
   30545           4 :     Py_XDECREF(reduce_ex);
   30546           4 :     Py_XDECREF(reduce_cython);
   30547           4 :     Py_XDECREF(setstate);
   30548           4 :     Py_XDECREF(setstate_cython);
   30549           4 :     return ret;
   30550             : }
   30551             : #endif
   30552             : 
   30553             : /* TypeImport */
   30554             :   #ifndef __PYX_HAVE_RT_ImportType_3_0_11
   30555             : #define __PYX_HAVE_RT_ImportType_3_0_11
   30556          16 : static PyTypeObject *__Pyx_ImportType_3_0_11(PyObject *module, const char *module_name, const char *class_name,
   30557             :     size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_11 check_size)
   30558             : {
   30559          16 :     PyObject *result = 0;
   30560          16 :     char warning[200];
   30561          16 :     Py_ssize_t basicsize;
   30562          16 :     Py_ssize_t itemsize;
   30563             : #if CYTHON_COMPILING_IN_LIMITED_API
   30564             :     PyObject *py_basicsize;
   30565             :     PyObject *py_itemsize;
   30566             : #endif
   30567          16 :     result = PyObject_GetAttrString(module, class_name);
   30568          16 :     if (!result)
   30569           0 :         goto bad;
   30570          16 :     if (!PyType_Check(result)) {
   30571           0 :         PyErr_Format(PyExc_TypeError,
   30572             :             "%.200s.%.200s is not a type object",
   30573             :             module_name, class_name);
   30574           0 :         goto bad;
   30575             :     }
   30576             : #if !CYTHON_COMPILING_IN_LIMITED_API
   30577          16 :     basicsize = ((PyTypeObject *)result)->tp_basicsize;
   30578          16 :     itemsize = ((PyTypeObject *)result)->tp_itemsize;
   30579             : #else
   30580             :     py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
   30581             :     if (!py_basicsize)
   30582             :         goto bad;
   30583             :     basicsize = PyLong_AsSsize_t(py_basicsize);
   30584             :     Py_DECREF(py_basicsize);
   30585             :     py_basicsize = 0;
   30586             :     if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
   30587             :         goto bad;
   30588             :     py_itemsize = PyObject_GetAttrString(result, "__itemsize__");
   30589             :     if (!py_itemsize)
   30590             :         goto bad;
   30591             :     itemsize = PyLong_AsSsize_t(py_itemsize);
   30592             :     Py_DECREF(py_itemsize);
   30593             :     py_itemsize = 0;
   30594             :     if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred())
   30595             :         goto bad;
   30596             : #endif
   30597          16 :     if (itemsize) {
   30598           1 :         if (size % alignment) {
   30599           0 :             alignment = size % alignment;
   30600             :         }
   30601           1 :         if (itemsize < (Py_ssize_t)alignment)
   30602             :             itemsize = (Py_ssize_t)alignment;
   30603             :     }
   30604          16 :     if ((size_t)(basicsize + itemsize) < size) {
   30605           0 :         PyErr_Format(PyExc_ValueError,
   30606             :             "%.200s.%.200s size changed, may indicate binary incompatibility. "
   30607             :             "Expected %zd from C header, got %zd from PyObject",
   30608             :             module_name, class_name, size, basicsize+itemsize);
   30609           0 :         goto bad;
   30610             :     }
   30611          16 :     if (check_size == __Pyx_ImportType_CheckSize_Error_3_0_11 &&
   30612           0 :             ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) {
   30613           0 :         PyErr_Format(PyExc_ValueError,
   30614             :             "%.200s.%.200s size changed, may indicate binary incompatibility. "
   30615             :             "Expected %zd from C header, got %zd-%zd from PyObject",
   30616             :             module_name, class_name, size, basicsize, basicsize+itemsize);
   30617           0 :         goto bad;
   30618             :     }
   30619          16 :     else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_0_11 && (size_t)basicsize > size) {
   30620           0 :         PyOS_snprintf(warning, sizeof(warning),
   30621             :             "%s.%s size changed, may indicate binary incompatibility. "
   30622             :             "Expected %zd from C header, got %zd from PyObject",
   30623             :             module_name, class_name, size, basicsize);
   30624           0 :         if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
   30625             :     }
   30626             :     return (PyTypeObject *)result;
   30627           0 : bad:
   30628           0 :     Py_XDECREF(result);
   30629           0 :     return NULL;
   30630             : }
   30631             : #endif
   30632             : 
   30633             : /* FetchSharedCythonModule */
   30634           1 :   static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
   30635           1 :     return __Pyx_PyImport_AddModuleRef((char*) __PYX_ABI_MODULE_NAME);
   30636             : }
   30637             : 
   30638             : /* FetchCommonType */
   30639           1 :   static int __Pyx_VerifyCachedType(PyObject *cached_type,
   30640             :                                const char *name,
   30641             :                                Py_ssize_t basicsize,
   30642             :                                Py_ssize_t expected_basicsize) {
   30643           1 :     if (!PyType_Check(cached_type)) {
   30644           0 :         PyErr_Format(PyExc_TypeError,
   30645             :             "Shared Cython type %.200s is not a type object", name);
   30646           0 :         return -1;
   30647             :     }
   30648           1 :     if (basicsize != expected_basicsize) {
   30649           0 :         PyErr_Format(PyExc_TypeError,
   30650             :             "Shared Cython type %.200s has the wrong size, try recompiling",
   30651             :             name);
   30652           0 :         return -1;
   30653             :     }
   30654             :     return 0;
   30655             : }
   30656             : #if !CYTHON_USE_TYPE_SPECS
   30657           1 : static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
   30658           1 :     PyObject* abi_module;
   30659           1 :     const char* object_name;
   30660           1 :     PyTypeObject *cached_type = NULL;
   30661           1 :     abi_module = __Pyx_FetchSharedCythonABIModule();
   30662           1 :     if (!abi_module) return NULL;
   30663           1 :     object_name = strrchr(type->tp_name, '.');
   30664           1 :     object_name = object_name ? object_name+1 : type->tp_name;
   30665           1 :     cached_type = (PyTypeObject*) PyObject_GetAttrString(abi_module, object_name);
   30666           1 :     if (cached_type) {
   30667           1 :         if (__Pyx_VerifyCachedType(
   30668             :               (PyObject *)cached_type,
   30669             :               object_name,
   30670             :               cached_type->tp_basicsize,
   30671             :               type->tp_basicsize) < 0) {
   30672           0 :             goto bad;
   30673             :         }
   30674           1 :         goto done;
   30675             :     }
   30676           0 :     if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
   30677           0 :     PyErr_Clear();
   30678           0 :     if (PyType_Ready(type) < 0) goto bad;
   30679           0 :     if (PyObject_SetAttrString(abi_module, object_name, (PyObject *)type) < 0)
   30680           0 :         goto bad;
   30681           0 :     Py_INCREF(type);
   30682             :     cached_type = type;
   30683           1 : done:
   30684           1 :     Py_DECREF(abi_module);
   30685             :     return cached_type;
   30686           0 : bad:
   30687           0 :     Py_XDECREF(cached_type);
   30688           0 :     cached_type = NULL;
   30689           0 :     goto done;
   30690             : }
   30691             : #else
   30692             : static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) {
   30693             :     PyObject *abi_module, *cached_type = NULL;
   30694             :     const char* object_name = strrchr(spec->name, '.');
   30695             :     object_name = object_name ? object_name+1 : spec->name;
   30696             :     abi_module = __Pyx_FetchSharedCythonABIModule();
   30697             :     if (!abi_module) return NULL;
   30698             :     cached_type = PyObject_GetAttrString(abi_module, object_name);
   30699             :     if (cached_type) {
   30700             :         Py_ssize_t basicsize;
   30701             : #if CYTHON_COMPILING_IN_LIMITED_API
   30702             :         PyObject *py_basicsize;
   30703             :         py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
   30704             :         if (unlikely(!py_basicsize)) goto bad;
   30705             :         basicsize = PyLong_AsSsize_t(py_basicsize);
   30706             :         Py_DECREF(py_basicsize);
   30707             :         py_basicsize = 0;
   30708             :         if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
   30709             : #else
   30710             :         basicsize = likely(PyType_Check(cached_type)) ? ((PyTypeObject*) cached_type)->tp_basicsize : -1;
   30711             : #endif
   30712             :         if (__Pyx_VerifyCachedType(
   30713             :               cached_type,
   30714             :               object_name,
   30715             :               basicsize,
   30716             :               spec->basicsize) < 0) {
   30717             :             goto bad;
   30718             :         }
   30719             :         goto done;
   30720             :     }
   30721             :     if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
   30722             :     PyErr_Clear();
   30723             :     CYTHON_UNUSED_VAR(module);
   30724             :     cached_type = __Pyx_PyType_FromModuleAndSpec(abi_module, spec, bases);
   30725             :     if (unlikely(!cached_type)) goto bad;
   30726             :     if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad;
   30727             :     if (PyObject_SetAttrString(abi_module, object_name, cached_type) < 0) goto bad;
   30728             : done:
   30729             :     Py_DECREF(abi_module);
   30730             :     assert(cached_type == NULL || PyType_Check(cached_type));
   30731             :     return (PyTypeObject *) cached_type;
   30732             : bad:
   30733             :     Py_XDECREF(cached_type);
   30734             :     cached_type = NULL;
   30735             :     goto done;
   30736             : }
   30737             : #endif
   30738             : 
   30739             : /* PyVectorcallFastCallDict */
   30740             :   #if CYTHON_METH_FASTCALL
   30741           0 : static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
   30742             : {
   30743           0 :     PyObject *res = NULL;
   30744           0 :     PyObject *kwnames;
   30745           0 :     PyObject **newargs;
   30746           0 :     PyObject **kwvalues;
   30747           0 :     Py_ssize_t i, pos;
   30748           0 :     size_t j;
   30749           0 :     PyObject *key, *value;
   30750           0 :     unsigned long keys_are_strings;
   30751           0 :     Py_ssize_t nkw = PyDict_GET_SIZE(kw);
   30752           0 :     newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0]));
   30753           0 :     if (unlikely(newargs == NULL)) {
   30754           0 :         PyErr_NoMemory();
   30755           0 :         return NULL;
   30756             :     }
   30757           0 :     for (j = 0; j < nargs; j++) newargs[j] = args[j];
   30758           0 :     kwnames = PyTuple_New(nkw);
   30759           0 :     if (unlikely(kwnames == NULL)) {
   30760           0 :         PyMem_Free(newargs);
   30761           0 :         return NULL;
   30762             :     }
   30763           0 :     kwvalues = newargs + nargs;
   30764           0 :     pos = i = 0;
   30765           0 :     keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
   30766           0 :     while (PyDict_Next(kw, &pos, &key, &value)) {
   30767           0 :         keys_are_strings &= Py_TYPE(key)->tp_flags;
   30768           0 :         Py_INCREF(key);
   30769           0 :         Py_INCREF(value);
   30770           0 :         PyTuple_SET_ITEM(kwnames, i, key);
   30771           0 :         kwvalues[i] = value;
   30772           0 :         i++;
   30773             :     }
   30774           0 :     if (unlikely(!keys_are_strings)) {
   30775           0 :         PyErr_SetString(PyExc_TypeError, "keywords must be strings");
   30776           0 :         goto cleanup;
   30777             :     }
   30778           0 :     res = vc(func, newargs, nargs, kwnames);
   30779           0 : cleanup:
   30780           0 :     Py_DECREF(kwnames);
   30781           0 :     for (i = 0; i < nkw; i++)
   30782           0 :         Py_DECREF(kwvalues[i]);
   30783           0 :     PyMem_Free(newargs);
   30784           0 :     return res;
   30785             : }
   30786           0 : static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
   30787             : {
   30788           0 :     if (likely(kw == NULL) || PyDict_GET_SIZE(kw) == 0) {
   30789           0 :         return vc(func, args, nargs, NULL);
   30790             :     }
   30791           0 :     return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
   30792             : }
   30793             : #endif
   30794             : 
   30795             : /* CythonFunctionShared */
   30796             :   #if CYTHON_COMPILING_IN_LIMITED_API
   30797             : static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) {
   30798             :     if (__Pyx_CyFunction_Check(func)) {
   30799             :         return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc;
   30800             :     } else if (PyCFunction_Check(func)) {
   30801             :         return PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
   30802             :     }
   30803             :     return 0;
   30804             : }
   30805             : #else
   30806             : static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) {
   30807             :     return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
   30808             : }
   30809             : #endif
   30810             : static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
   30811             : #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
   30812             :     __Pyx_Py_XDECREF_SET(
   30813             :         __Pyx_CyFunction_GetClassObj(f),
   30814             :             ((classobj) ? __Pyx_NewRef(classobj) : NULL));
   30815             : #else
   30816             :     __Pyx_Py_XDECREF_SET(
   30817             :         ((PyCMethodObject *) (f))->mm_class,
   30818             :         (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
   30819             : #endif
   30820             : }
   30821             : static PyObject *
   30822           0 : __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure)
   30823             : {
   30824           0 :     CYTHON_UNUSED_VAR(closure);
   30825           0 :     if (unlikely(op->func_doc == NULL)) {
   30826             : #if CYTHON_COMPILING_IN_LIMITED_API
   30827             :         op->func_doc = PyObject_GetAttrString(op->func, "__doc__");
   30828             :         if (unlikely(!op->func_doc)) return NULL;
   30829             : #else
   30830           0 :         if (((PyCFunctionObject*)op)->m_ml->ml_doc) {
   30831             : #if PY_MAJOR_VERSION >= 3
   30832           0 :             op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
   30833             : #else
   30834             :             op->func_doc = PyString_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
   30835             : #endif
   30836           0 :             if (unlikely(op->func_doc == NULL))
   30837             :                 return NULL;
   30838             :         } else {
   30839           0 :             Py_INCREF(Py_None);
   30840           0 :             return Py_None;
   30841             :         }
   30842             : #endif
   30843             :     }
   30844           0 :     Py_INCREF(op->func_doc);
   30845             :     return op->func_doc;
   30846             : }
   30847             : static int
   30848           0 : __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context)
   30849             : {
   30850           0 :     CYTHON_UNUSED_VAR(context);
   30851           0 :     if (value == NULL) {
   30852           0 :         value = Py_None;
   30853             :     }
   30854           0 :     Py_INCREF(value);
   30855           0 :     __Pyx_Py_XDECREF_SET(op->func_doc, value);
   30856           0 :     return 0;
   30857             : }
   30858             : static PyObject *
   30859           0 : __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context)
   30860             : {
   30861           0 :     CYTHON_UNUSED_VAR(context);
   30862           0 :     if (unlikely(op->func_name == NULL)) {
   30863             : #if CYTHON_COMPILING_IN_LIMITED_API
   30864             :         op->func_name = PyObject_GetAttrString(op->func, "__name__");
   30865             : #elif PY_MAJOR_VERSION >= 3
   30866           0 :         op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
   30867             : #else
   30868             :         op->func_name = PyString_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
   30869             : #endif
   30870           0 :         if (unlikely(op->func_name == NULL))
   30871             :             return NULL;
   30872             :     }
   30873           0 :     Py_INCREF(op->func_name);
   30874             :     return op->func_name;
   30875             : }
   30876             : static int
   30877           0 : __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context)
   30878             : {
   30879           0 :     CYTHON_UNUSED_VAR(context);
   30880             : #if PY_MAJOR_VERSION >= 3
   30881           0 :     if (unlikely(value == NULL || !PyUnicode_Check(value)))
   30882             : #else
   30883             :     if (unlikely(value == NULL || !PyString_Check(value)))
   30884             : #endif
   30885             :     {
   30886           0 :         PyErr_SetString(PyExc_TypeError,
   30887             :                         "__name__ must be set to a string object");
   30888           0 :         return -1;
   30889             :     }
   30890           0 :     Py_INCREF(value);
   30891           0 :     __Pyx_Py_XDECREF_SET(op->func_name, value);
   30892           0 :     return 0;
   30893             : }
   30894             : static PyObject *
   30895           0 : __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context)
   30896             : {
   30897           0 :     CYTHON_UNUSED_VAR(context);
   30898           0 :     Py_INCREF(op->func_qualname);
   30899           0 :     return op->func_qualname;
   30900             : }
   30901             : static int
   30902           0 : __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context)
   30903             : {
   30904           0 :     CYTHON_UNUSED_VAR(context);
   30905             : #if PY_MAJOR_VERSION >= 3
   30906           0 :     if (unlikely(value == NULL || !PyUnicode_Check(value)))
   30907             : #else
   30908             :     if (unlikely(value == NULL || !PyString_Check(value)))
   30909             : #endif
   30910             :     {
   30911           0 :         PyErr_SetString(PyExc_TypeError,
   30912             :                         "__qualname__ must be set to a string object");
   30913           0 :         return -1;
   30914             :     }
   30915           0 :     Py_INCREF(value);
   30916           0 :     __Pyx_Py_XDECREF_SET(op->func_qualname, value);
   30917           0 :     return 0;
   30918             : }
   30919             : static PyObject *
   30920           0 : __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
   30921             : {
   30922           0 :     CYTHON_UNUSED_VAR(context);
   30923           0 :     if (unlikely(op->func_dict == NULL)) {
   30924           0 :         op->func_dict = PyDict_New();
   30925           0 :         if (unlikely(op->func_dict == NULL))
   30926             :             return NULL;
   30927             :     }
   30928           0 :     Py_INCREF(op->func_dict);
   30929             :     return op->func_dict;
   30930             : }
   30931             : static int
   30932           0 : __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context)
   30933             : {
   30934           0 :     CYTHON_UNUSED_VAR(context);
   30935           0 :     if (unlikely(value == NULL)) {
   30936           0 :         PyErr_SetString(PyExc_TypeError,
   30937             :                "function's dictionary may not be deleted");
   30938           0 :         return -1;
   30939             :     }
   30940           0 :     if (unlikely(!PyDict_Check(value))) {
   30941           0 :         PyErr_SetString(PyExc_TypeError,
   30942             :                "setting function's dictionary to a non-dict");
   30943           0 :         return -1;
   30944             :     }
   30945           0 :     Py_INCREF(value);
   30946           0 :     __Pyx_Py_XDECREF_SET(op->func_dict, value);
   30947           0 :     return 0;
   30948             : }
   30949             : static PyObject *
   30950           0 : __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context)
   30951             : {
   30952           0 :     CYTHON_UNUSED_VAR(context);
   30953           0 :     Py_INCREF(op->func_globals);
   30954           0 :     return op->func_globals;
   30955             : }
   30956             : static PyObject *
   30957           0 : __Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context)
   30958             : {
   30959           0 :     CYTHON_UNUSED_VAR(op);
   30960           0 :     CYTHON_UNUSED_VAR(context);
   30961           0 :     Py_INCREF(Py_None);
   30962           0 :     return Py_None;
   30963             : }
   30964             : static PyObject *
   30965           0 : __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context)
   30966             : {
   30967           0 :     PyObject* result = (op->func_code) ? op->func_code : Py_None;
   30968           0 :     CYTHON_UNUSED_VAR(context);
   30969           0 :     Py_INCREF(result);
   30970           0 :     return result;
   30971             : }
   30972             : static int
   30973           0 : __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
   30974           0 :     int result = 0;
   30975           0 :     PyObject *res = op->defaults_getter((PyObject *) op);
   30976           0 :     if (unlikely(!res))
   30977             :         return -1;
   30978             :     #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   30979           0 :     op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
   30980           0 :     Py_INCREF(op->defaults_tuple);
   30981           0 :     op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
   30982           0 :     Py_INCREF(op->defaults_kwdict);
   30983             :     #else
   30984             :     op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0);
   30985             :     if (unlikely(!op->defaults_tuple)) result = -1;
   30986             :     else {
   30987             :         op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1);
   30988             :         if (unlikely(!op->defaults_kwdict)) result = -1;
   30989             :     }
   30990             :     #endif
   30991           0 :     Py_DECREF(res);
   30992             :     return result;
   30993             : }
   30994             : static int
   30995           0 : __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
   30996           0 :     CYTHON_UNUSED_VAR(context);
   30997           0 :     if (!value) {
   30998             :         value = Py_None;
   30999           0 :     } else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
   31000           0 :         PyErr_SetString(PyExc_TypeError,
   31001             :                         "__defaults__ must be set to a tuple object");
   31002           0 :         return -1;
   31003             :     }
   31004           0 :     PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not "
   31005             :                  "currently affect the values used in function calls", 1);
   31006           0 :     Py_INCREF(value);
   31007           0 :     __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
   31008           0 :     return 0;
   31009             : }
   31010             : static PyObject *
   31011           0 : __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) {
   31012           0 :     PyObject* result = op->defaults_tuple;
   31013           0 :     CYTHON_UNUSED_VAR(context);
   31014           0 :     if (unlikely(!result)) {
   31015           0 :         if (op->defaults_getter) {
   31016           0 :             if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
   31017           0 :             result = op->defaults_tuple;
   31018             :         } else {
   31019             :             result = Py_None;
   31020             :         }
   31021             :     }
   31022           0 :     Py_INCREF(result);
   31023             :     return result;
   31024             : }
   31025             : static int
   31026           0 : __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
   31027           0 :     CYTHON_UNUSED_VAR(context);
   31028           0 :     if (!value) {
   31029             :         value = Py_None;
   31030           0 :     } else if (unlikely(value != Py_None && !PyDict_Check(value))) {
   31031           0 :         PyErr_SetString(PyExc_TypeError,
   31032             :                         "__kwdefaults__ must be set to a dict object");
   31033           0 :         return -1;
   31034             :     }
   31035           0 :     PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not "
   31036             :                  "currently affect the values used in function calls", 1);
   31037           0 :     Py_INCREF(value);
   31038           0 :     __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
   31039           0 :     return 0;
   31040             : }
   31041             : static PyObject *
   31042           0 : __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) {
   31043           0 :     PyObject* result = op->defaults_kwdict;
   31044           0 :     CYTHON_UNUSED_VAR(context);
   31045           0 :     if (unlikely(!result)) {
   31046           0 :         if (op->defaults_getter) {
   31047           0 :             if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
   31048           0 :             result = op->defaults_kwdict;
   31049             :         } else {
   31050             :             result = Py_None;
   31051             :         }
   31052             :     }
   31053           0 :     Py_INCREF(result);
   31054             :     return result;
   31055             : }
   31056             : static int
   31057           0 : __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
   31058           0 :     CYTHON_UNUSED_VAR(context);
   31059           0 :     if (!value || value == Py_None) {
   31060             :         value = NULL;
   31061           0 :     } else if (unlikely(!PyDict_Check(value))) {
   31062           0 :         PyErr_SetString(PyExc_TypeError,
   31063             :                         "__annotations__ must be set to a dict object");
   31064           0 :         return -1;
   31065             :     }
   31066           0 :     Py_XINCREF(value);
   31067           0 :     __Pyx_Py_XDECREF_SET(op->func_annotations, value);
   31068           0 :     return 0;
   31069             : }
   31070             : static PyObject *
   31071           0 : __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) {
   31072           0 :     PyObject* result = op->func_annotations;
   31073           0 :     CYTHON_UNUSED_VAR(context);
   31074           0 :     if (unlikely(!result)) {
   31075           0 :         result = PyDict_New();
   31076           0 :         if (unlikely(!result)) return NULL;
   31077           0 :         op->func_annotations = result;
   31078             :     }
   31079           0 :     Py_INCREF(result);
   31080             :     return result;
   31081             : }
   31082             : static PyObject *
   31083           0 : __Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) {
   31084           0 :     int is_coroutine;
   31085           0 :     CYTHON_UNUSED_VAR(context);
   31086           0 :     if (op->func_is_coroutine) {
   31087           0 :         return __Pyx_NewRef(op->func_is_coroutine);
   31088             :     }
   31089           0 :     is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
   31090             : #if PY_VERSION_HEX >= 0x03050000
   31091           0 :     if (is_coroutine) {
   31092           0 :         PyObject *module, *fromlist, *marker = __pyx_n_s_is_coroutine;
   31093           0 :         fromlist = PyList_New(1);
   31094           0 :         if (unlikely(!fromlist)) return NULL;
   31095           0 :         Py_INCREF(marker);
   31096             : #if CYTHON_ASSUME_SAFE_MACROS
   31097           0 :         PyList_SET_ITEM(fromlist, 0, marker);
   31098             : #else
   31099             :         if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) {
   31100             :             Py_DECREF(marker);
   31101             :             Py_DECREF(fromlist);
   31102             :             return NULL;
   31103             :         }
   31104             : #endif
   31105           0 :         module = PyImport_ImportModuleLevelObject(__pyx_n_s_asyncio_coroutines, NULL, NULL, fromlist, 0);
   31106           0 :         Py_DECREF(fromlist);
   31107           0 :         if (unlikely(!module)) goto ignore;
   31108           0 :         op->func_is_coroutine = __Pyx_PyObject_GetAttrStr(module, marker);
   31109           0 :         Py_DECREF(module);
   31110           0 :         if (likely(op->func_is_coroutine)) {
   31111           0 :             return __Pyx_NewRef(op->func_is_coroutine);
   31112             :         }
   31113           0 : ignore:
   31114           0 :         PyErr_Clear();
   31115             :     }
   31116             : #endif
   31117           0 :     op->func_is_coroutine = __Pyx_PyBool_FromLong(is_coroutine);
   31118           0 :     return __Pyx_NewRef(op->func_is_coroutine);
   31119             : }
   31120             : #if CYTHON_COMPILING_IN_LIMITED_API
   31121             : static PyObject *
   31122             : __Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) {
   31123             :     CYTHON_UNUSED_VAR(context);
   31124             :     return PyObject_GetAttrString(op->func, "__module__");
   31125             : }
   31126             : static int
   31127             : __Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
   31128             :     CYTHON_UNUSED_VAR(context);
   31129             :     return PyObject_SetAttrString(op->func, "__module__", value);
   31130             : }
   31131             : #endif
   31132             : static PyGetSetDef __pyx_CyFunction_getsets[] = {
   31133             :     {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
   31134             :     {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
   31135             :     {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
   31136             :     {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
   31137             :     {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
   31138             :     {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
   31139             :     {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
   31140             :     {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
   31141             :     {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
   31142             :     {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
   31143             :     {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
   31144             :     {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
   31145             :     {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
   31146             :     {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
   31147             :     {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
   31148             :     {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
   31149             :     {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
   31150             :     {(char *) "_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
   31151             : #if CYTHON_COMPILING_IN_LIMITED_API
   31152             :     {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0},
   31153             : #endif
   31154             :     {0, 0, 0, 0, 0}
   31155             : };
   31156             : static PyMemberDef __pyx_CyFunction_members[] = {
   31157             : #if !CYTHON_COMPILING_IN_LIMITED_API
   31158             :     {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
   31159             : #endif
   31160             : #if CYTHON_USE_TYPE_SPECS
   31161             :     {(char *) "__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0},
   31162             : #if CYTHON_METH_FASTCALL
   31163             : #if CYTHON_BACKPORT_VECTORCALL
   31164             :     {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0},
   31165             : #else
   31166             : #if !CYTHON_COMPILING_IN_LIMITED_API
   31167             :     {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
   31168             : #endif
   31169             : #endif
   31170             : #endif
   31171             : #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
   31172             :     {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0},
   31173             : #else
   31174             :     {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
   31175             : #endif
   31176             : #endif
   31177             :     {0, 0, 0,  0, 0}
   31178             : };
   31179             : static PyObject *
   31180           0 : __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args)
   31181             : {
   31182           0 :     CYTHON_UNUSED_VAR(args);
   31183             : #if PY_MAJOR_VERSION >= 3
   31184           0 :     Py_INCREF(m->func_qualname);
   31185           0 :     return m->func_qualname;
   31186             : #else
   31187             :     return PyString_FromString(((PyCFunctionObject*)m)->m_ml->ml_name);
   31188             : #endif
   31189             : }
   31190             : static PyMethodDef __pyx_CyFunction_methods[] = {
   31191             :     {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
   31192             :     {0, 0, 0, 0}
   31193             : };
   31194             : #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
   31195             : #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
   31196             : #else
   31197             : #define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
   31198             : #endif
   31199           1 : static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
   31200             :                                        PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
   31201             : #if !CYTHON_COMPILING_IN_LIMITED_API
   31202           1 :     PyCFunctionObject *cf = (PyCFunctionObject*) op;
   31203             : #endif
   31204           1 :     if (unlikely(op == NULL))
   31205             :         return NULL;
   31206             : #if CYTHON_COMPILING_IN_LIMITED_API
   31207             :     op->func = PyCFunction_NewEx(ml, (PyObject*)op, module);
   31208             :     if (unlikely(!op->func)) return NULL;
   31209             : #endif
   31210           1 :     op->flags = flags;
   31211           1 :     __Pyx_CyFunction_weakreflist(op) = NULL;
   31212             : #if !CYTHON_COMPILING_IN_LIMITED_API
   31213           1 :     cf->m_ml = ml;
   31214           1 :     cf->m_self = (PyObject *) op;
   31215             : #endif
   31216           1 :     Py_XINCREF(closure);
   31217           1 :     op->func_closure = closure;
   31218             : #if !CYTHON_COMPILING_IN_LIMITED_API
   31219           1 :     Py_XINCREF(module);
   31220           1 :     cf->m_module = module;
   31221             : #endif
   31222           1 :     op->func_dict = NULL;
   31223           1 :     op->func_name = NULL;
   31224           1 :     Py_INCREF(qualname);
   31225           1 :     op->func_qualname = qualname;
   31226           1 :     op->func_doc = NULL;
   31227             : #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
   31228             :     op->func_classobj = NULL;
   31229             : #else
   31230           1 :     ((PyCMethodObject*)op)->mm_class = NULL;
   31231             : #endif
   31232           1 :     op->func_globals = globals;
   31233           1 :     Py_INCREF(op->func_globals);
   31234           1 :     Py_XINCREF(code);
   31235           1 :     op->func_code = code;
   31236           1 :     op->defaults_pyobjects = 0;
   31237           1 :     op->defaults_size = 0;
   31238           1 :     op->defaults = NULL;
   31239           1 :     op->defaults_tuple = NULL;
   31240           1 :     op->defaults_kwdict = NULL;
   31241           1 :     op->defaults_getter = NULL;
   31242           1 :     op->func_annotations = NULL;
   31243           1 :     op->func_is_coroutine = NULL;
   31244             : #if CYTHON_METH_FASTCALL
   31245           1 :     switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
   31246           0 :     case METH_NOARGS:
   31247           0 :         __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
   31248           0 :         break;
   31249           0 :     case METH_O:
   31250           0 :         __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
   31251           0 :         break;
   31252           0 :     case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
   31253           0 :         __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
   31254           0 :         break;
   31255           1 :     case METH_FASTCALL | METH_KEYWORDS:
   31256           1 :         __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
   31257           1 :         break;
   31258           0 :     case METH_VARARGS | METH_KEYWORDS:
   31259           0 :         __Pyx_CyFunction_func_vectorcall(op) = NULL;
   31260           0 :         break;
   31261           0 :     default:
   31262           0 :         PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
   31263           0 :         Py_DECREF(op);
   31264             :         return NULL;
   31265             :     }
   31266             : #endif
   31267             :     return (PyObject *) op;
   31268             : }
   31269             : static int
   31270           0 : __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
   31271             : {
   31272           0 :     Py_CLEAR(m->func_closure);
   31273             : #if CYTHON_COMPILING_IN_LIMITED_API
   31274             :     Py_CLEAR(m->func);
   31275             : #else
   31276           0 :     Py_CLEAR(((PyCFunctionObject*)m)->m_module);
   31277             : #endif
   31278           0 :     Py_CLEAR(m->func_dict);
   31279           0 :     Py_CLEAR(m->func_name);
   31280           0 :     Py_CLEAR(m->func_qualname);
   31281           0 :     Py_CLEAR(m->func_doc);
   31282           0 :     Py_CLEAR(m->func_globals);
   31283           0 :     Py_CLEAR(m->func_code);
   31284             : #if !CYTHON_COMPILING_IN_LIMITED_API
   31285             : #if PY_VERSION_HEX < 0x030900B1
   31286             :     Py_CLEAR(__Pyx_CyFunction_GetClassObj(m));
   31287             : #else
   31288             :     {
   31289           0 :         PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
   31290           0 :         ((PyCMethodObject *) (m))->mm_class = NULL;
   31291           0 :         Py_XDECREF(cls);
   31292             :     }
   31293             : #endif
   31294             : #endif
   31295           0 :     Py_CLEAR(m->defaults_tuple);
   31296           0 :     Py_CLEAR(m->defaults_kwdict);
   31297           0 :     Py_CLEAR(m->func_annotations);
   31298           0 :     Py_CLEAR(m->func_is_coroutine);
   31299           0 :     if (m->defaults) {
   31300             :         PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
   31301             :         int i;
   31302           0 :         for (i = 0; i < m->defaults_pyobjects; i++)
   31303           0 :             Py_XDECREF(pydefaults[i]);
   31304           0 :         PyObject_Free(m->defaults);
   31305           0 :         m->defaults = NULL;
   31306             :     }
   31307           0 :     return 0;
   31308             : }
   31309           0 : static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
   31310             : {
   31311           0 :     if (__Pyx_CyFunction_weakreflist(m) != NULL)
   31312           0 :         PyObject_ClearWeakRefs((PyObject *) m);
   31313           0 :     __Pyx_CyFunction_clear(m);
   31314           0 :     __Pyx_PyHeapTypeObject_GC_Del(m);
   31315           0 : }
   31316           0 : static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
   31317             : {
   31318           0 :     PyObject_GC_UnTrack(m);
   31319           0 :     __Pyx__CyFunction_dealloc(m);
   31320           0 : }
   31321           0 : static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
   31322             : {
   31323           0 :     Py_VISIT(m->func_closure);
   31324             : #if CYTHON_COMPILING_IN_LIMITED_API
   31325             :     Py_VISIT(m->func);
   31326             : #else
   31327           0 :     Py_VISIT(((PyCFunctionObject*)m)->m_module);
   31328             : #endif
   31329           0 :     Py_VISIT(m->func_dict);
   31330           0 :     Py_VISIT(m->func_name);
   31331           0 :     Py_VISIT(m->func_qualname);
   31332           0 :     Py_VISIT(m->func_doc);
   31333           0 :     Py_VISIT(m->func_globals);
   31334           0 :     Py_VISIT(m->func_code);
   31335             : #if !CYTHON_COMPILING_IN_LIMITED_API
   31336           0 :     Py_VISIT(__Pyx_CyFunction_GetClassObj(m));
   31337             : #endif
   31338           0 :     Py_VISIT(m->defaults_tuple);
   31339           0 :     Py_VISIT(m->defaults_kwdict);
   31340           0 :     Py_VISIT(m->func_is_coroutine);
   31341           0 :     if (m->defaults) {
   31342             :         PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
   31343             :         int i;
   31344           0 :         for (i = 0; i < m->defaults_pyobjects; i++)
   31345           0 :             Py_VISIT(pydefaults[i]);
   31346             :     }
   31347             :     return 0;
   31348             : }
   31349             : static PyObject*
   31350           0 : __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
   31351             : {
   31352             : #if PY_MAJOR_VERSION >= 3
   31353           0 :     return PyUnicode_FromFormat("<cyfunction %U at %p>",
   31354             :                                 op->func_qualname, (void *)op);
   31355             : #else
   31356             :     return PyString_FromFormat("<cyfunction %s at %p>",
   31357             :                                PyString_AsString(op->func_qualname), (void *)op);
   31358             : #endif
   31359             : }
   31360           0 : static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
   31361             : #if CYTHON_COMPILING_IN_LIMITED_API
   31362             :     PyObject *f = ((__pyx_CyFunctionObject*)func)->func;
   31363             :     PyObject *py_name = NULL;
   31364             :     PyCFunction meth;
   31365             :     int flags;
   31366             :     meth = PyCFunction_GetFunction(f);
   31367             :     if (unlikely(!meth)) return NULL;
   31368             :     flags = PyCFunction_GetFlags(f);
   31369             :     if (unlikely(flags < 0)) return NULL;
   31370             : #else
   31371           0 :     PyCFunctionObject* f = (PyCFunctionObject*)func;
   31372           0 :     PyCFunction meth = f->m_ml->ml_meth;
   31373           0 :     int flags = f->m_ml->ml_flags;
   31374             : #endif
   31375           0 :     Py_ssize_t size;
   31376           0 :     switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
   31377           0 :     case METH_VARARGS:
   31378           0 :         if (likely(kw == NULL || PyDict_Size(kw) == 0))
   31379           0 :             return (*meth)(self, arg);
   31380             :         break;
   31381           0 :     case METH_VARARGS | METH_KEYWORDS:
   31382           0 :         return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
   31383           0 :     case METH_NOARGS:
   31384           0 :         if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
   31385             : #if CYTHON_ASSUME_SAFE_MACROS
   31386           0 :             size = PyTuple_GET_SIZE(arg);
   31387             : #else
   31388             :             size = PyTuple_Size(arg);
   31389             :             if (unlikely(size < 0)) return NULL;
   31390             : #endif
   31391           0 :             if (likely(size == 0))
   31392           0 :                 return (*meth)(self, NULL);
   31393             : #if CYTHON_COMPILING_IN_LIMITED_API
   31394             :             py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
   31395             :             if (!py_name) return NULL;
   31396             :             PyErr_Format(PyExc_TypeError,
   31397             :                 "%.200S() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
   31398             :                 py_name, size);
   31399             :             Py_DECREF(py_name);
   31400             : #else
   31401           0 :             PyErr_Format(PyExc_TypeError,
   31402             :                 "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
   31403           0 :                 f->m_ml->ml_name, size);
   31404             : #endif
   31405           0 :             return NULL;
   31406             :         }
   31407             :         break;
   31408           0 :     case METH_O:
   31409           0 :         if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
   31410             : #if CYTHON_ASSUME_SAFE_MACROS
   31411           0 :             size = PyTuple_GET_SIZE(arg);
   31412             : #else
   31413             :             size = PyTuple_Size(arg);
   31414             :             if (unlikely(size < 0)) return NULL;
   31415             : #endif
   31416           0 :             if (likely(size == 1)) {
   31417           0 :                 PyObject *result, *arg0;
   31418             :                 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
   31419           0 :                 arg0 = PyTuple_GET_ITEM(arg, 0);
   31420             :                 #else
   31421             :                 arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
   31422             :                 #endif
   31423           0 :                 result = (*meth)(self, arg0);
   31424             :                 #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
   31425             :                 Py_DECREF(arg0);
   31426             :                 #endif
   31427           0 :                 return result;
   31428             :             }
   31429             : #if CYTHON_COMPILING_IN_LIMITED_API
   31430             :             py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
   31431             :             if (!py_name) return NULL;
   31432             :             PyErr_Format(PyExc_TypeError,
   31433             :                 "%.200S() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
   31434             :                 py_name, size);
   31435             :             Py_DECREF(py_name);
   31436             : #else
   31437           0 :             PyErr_Format(PyExc_TypeError,
   31438             :                 "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
   31439           0 :                 f->m_ml->ml_name, size);
   31440             : #endif
   31441           0 :             return NULL;
   31442             :         }
   31443             :         break;
   31444           0 :     default:
   31445           0 :         PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
   31446           0 :         return NULL;
   31447             :     }
   31448             : #if CYTHON_COMPILING_IN_LIMITED_API
   31449             :     py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
   31450             :     if (!py_name) return NULL;
   31451             :     PyErr_Format(PyExc_TypeError, "%.200S() takes no keyword arguments",
   31452             :                  py_name);
   31453             :     Py_DECREF(py_name);
   31454             : #else
   31455           0 :     PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
   31456           0 :                  f->m_ml->ml_name);
   31457             : #endif
   31458           0 :     return NULL;
   31459             : }
   31460           0 : static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
   31461           0 :     PyObject *self, *result;
   31462             : #if CYTHON_COMPILING_IN_LIMITED_API
   31463             :     self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func);
   31464             :     if (unlikely(!self) && PyErr_Occurred()) return NULL;
   31465             : #else
   31466           0 :     self = ((PyCFunctionObject*)func)->m_self;
   31467             : #endif
   31468           0 :     result = __Pyx_CyFunction_CallMethod(func, self, arg, kw);
   31469           0 :     return result;
   31470             : }
   31471           0 : static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
   31472           0 :     PyObject *result;
   31473           0 :     __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
   31474             : #if CYTHON_METH_FASTCALL
   31475           0 :      __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
   31476           0 :     if (vc) {
   31477             : #if CYTHON_ASSUME_SAFE_MACROS
   31478           0 :         return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw);
   31479             : #else
   31480             :         (void) &__Pyx_PyVectorcall_FastCallDict;
   31481             :         return PyVectorcall_Call(func, args, kw);
   31482             : #endif
   31483             :     }
   31484             : #endif
   31485           0 :     if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
   31486           0 :         Py_ssize_t argc;
   31487           0 :         PyObject *new_args;
   31488           0 :         PyObject *self;
   31489             : #if CYTHON_ASSUME_SAFE_MACROS
   31490           0 :         argc = PyTuple_GET_SIZE(args);
   31491             : #else
   31492             :         argc = PyTuple_Size(args);
   31493             :         if (unlikely(!argc) < 0) return NULL;
   31494             : #endif
   31495           0 :         new_args = PyTuple_GetSlice(args, 1, argc);
   31496           0 :         if (unlikely(!new_args))
   31497             :             return NULL;
   31498           0 :         self = PyTuple_GetItem(args, 0);
   31499           0 :         if (unlikely(!self)) {
   31500           0 :             Py_DECREF(new_args);
   31501             : #if PY_MAJOR_VERSION > 2
   31502           0 :             PyErr_Format(PyExc_TypeError,
   31503             :                          "unbound method %.200S() needs an argument",
   31504             :                          cyfunc->func_qualname);
   31505             : #else
   31506             :             PyErr_SetString(PyExc_TypeError,
   31507             :                             "unbound method needs an argument");
   31508             : #endif
   31509           0 :             return NULL;
   31510             :         }
   31511           0 :         result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
   31512           0 :         Py_DECREF(new_args);
   31513             :     } else {
   31514           0 :         result = __Pyx_CyFunction_Call(func, args, kw);
   31515             :     }
   31516             :     return result;
   31517             : }
   31518             : #if CYTHON_METH_FASTCALL
   31519         141 : static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
   31520             : {
   31521         141 :     int ret = 0;
   31522         141 :     if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
   31523           0 :         if (unlikely(nargs < 1)) {
   31524           0 :             PyErr_Format(PyExc_TypeError, "%.200s() needs an argument",
   31525           0 :                          ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
   31526           0 :             return -1;
   31527             :         }
   31528             :         ret = 1;
   31529             :     }
   31530         141 :     if (unlikely(kwnames) && unlikely(PyTuple_GET_SIZE(kwnames))) {
   31531           0 :         PyErr_Format(PyExc_TypeError,
   31532           0 :                      "%.200s() takes no keyword arguments", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
   31533           0 :         return -1;
   31534             :     }
   31535             :     return ret;
   31536             : }
   31537           0 : static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
   31538             : {
   31539           0 :     __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
   31540           0 :     PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
   31541             : #if CYTHON_BACKPORT_VECTORCALL
   31542             :     Py_ssize_t nargs = (Py_ssize_t)nargsf;
   31543             : #else
   31544           0 :     Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
   31545             : #endif
   31546           0 :     PyObject *self;
   31547           0 :     switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
   31548           0 :     case 1:
   31549           0 :         self = args[0];
   31550           0 :         args += 1;
   31551           0 :         nargs -= 1;
   31552           0 :         break;
   31553           0 :     case 0:
   31554           0 :         self = ((PyCFunctionObject*)cyfunc)->m_self;
   31555           0 :         break;
   31556             :     default:
   31557             :         return NULL;
   31558             :     }
   31559           0 :     if (unlikely(nargs != 0)) {
   31560           0 :         PyErr_Format(PyExc_TypeError,
   31561             :             "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
   31562             :             def->ml_name, nargs);
   31563           0 :         return NULL;
   31564             :     }
   31565           0 :     return def->ml_meth(self, NULL);
   31566             : }
   31567           0 : static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
   31568             : {
   31569           0 :     __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
   31570           0 :     PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
   31571             : #if CYTHON_BACKPORT_VECTORCALL
   31572             :     Py_ssize_t nargs = (Py_ssize_t)nargsf;
   31573             : #else
   31574           0 :     Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
   31575             : #endif
   31576           0 :     PyObject *self;
   31577           0 :     switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
   31578           0 :     case 1:
   31579           0 :         self = args[0];
   31580           0 :         args += 1;
   31581           0 :         nargs -= 1;
   31582           0 :         break;
   31583           0 :     case 0:
   31584           0 :         self = ((PyCFunctionObject*)cyfunc)->m_self;
   31585           0 :         break;
   31586             :     default:
   31587             :         return NULL;
   31588             :     }
   31589           0 :     if (unlikely(nargs != 1)) {
   31590           0 :         PyErr_Format(PyExc_TypeError,
   31591             :             "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
   31592             :             def->ml_name, nargs);
   31593           0 :         return NULL;
   31594             :     }
   31595           0 :     return def->ml_meth(self, args[0]);
   31596             : }
   31597         141 : static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
   31598             : {
   31599         141 :     __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
   31600         141 :     PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
   31601             : #if CYTHON_BACKPORT_VECTORCALL
   31602             :     Py_ssize_t nargs = (Py_ssize_t)nargsf;
   31603             : #else
   31604         141 :     Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
   31605             : #endif
   31606         141 :     PyObject *self;
   31607         141 :     switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
   31608           0 :     case 1:
   31609           0 :         self = args[0];
   31610           0 :         args += 1;
   31611           0 :         nargs -= 1;
   31612           0 :         break;
   31613         141 :     case 0:
   31614         141 :         self = ((PyCFunctionObject*)cyfunc)->m_self;
   31615         141 :         break;
   31616             :     default:
   31617             :         return NULL;
   31618             :     }
   31619         141 :     return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames);
   31620             : }
   31621           0 : static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
   31622             : {
   31623           0 :     __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
   31624           0 :     PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
   31625           0 :     PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc);
   31626             : #if CYTHON_BACKPORT_VECTORCALL
   31627             :     Py_ssize_t nargs = (Py_ssize_t)nargsf;
   31628             : #else
   31629           0 :     Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
   31630             : #endif
   31631           0 :     PyObject *self;
   31632           0 :     switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
   31633           0 :     case 1:
   31634           0 :         self = args[0];
   31635           0 :         args += 1;
   31636           0 :         nargs -= 1;
   31637           0 :         break;
   31638           0 :     case 0:
   31639           0 :         self = ((PyCFunctionObject*)cyfunc)->m_self;
   31640           0 :         break;
   31641             :     default:
   31642             :         return NULL;
   31643             :     }
   31644           0 :     return ((__Pyx_PyCMethod)(void(*)(void))def->ml_meth)(self, cls, args, (size_t)nargs, kwnames);
   31645             : }
   31646             : #endif
   31647             : #if CYTHON_USE_TYPE_SPECS
   31648             : static PyType_Slot __pyx_CyFunctionType_slots[] = {
   31649             :     {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc},
   31650             :     {Py_tp_repr, (void *)__Pyx_CyFunction_repr},
   31651             :     {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod},
   31652             :     {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse},
   31653             :     {Py_tp_clear, (void *)__Pyx_CyFunction_clear},
   31654             :     {Py_tp_methods, (void *)__pyx_CyFunction_methods},
   31655             :     {Py_tp_members, (void *)__pyx_CyFunction_members},
   31656             :     {Py_tp_getset, (void *)__pyx_CyFunction_getsets},
   31657             :     {Py_tp_descr_get, (void *)__Pyx_PyMethod_New},
   31658             :     {0, 0},
   31659             : };
   31660             : static PyType_Spec __pyx_CyFunctionType_spec = {
   31661             :     __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
   31662             :     sizeof(__pyx_CyFunctionObject),
   31663             :     0,
   31664             : #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
   31665             :     Py_TPFLAGS_METHOD_DESCRIPTOR |
   31666             : #endif
   31667             : #if (defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL)
   31668             :     _Py_TPFLAGS_HAVE_VECTORCALL |
   31669             : #endif
   31670             :     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
   31671             :     __pyx_CyFunctionType_slots
   31672             : };
   31673             : #else
   31674             : static PyTypeObject __pyx_CyFunctionType_type = {
   31675             :     PyVarObject_HEAD_INIT(0, 0)
   31676             :     __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
   31677             :     sizeof(__pyx_CyFunctionObject),
   31678             :     0,
   31679             :     (destructor) __Pyx_CyFunction_dealloc,
   31680             : #if !CYTHON_METH_FASTCALL
   31681             :     0,
   31682             : #elif CYTHON_BACKPORT_VECTORCALL
   31683             :     (printfunc)offsetof(__pyx_CyFunctionObject, func_vectorcall),
   31684             : #else
   31685             :     offsetof(PyCFunctionObject, vectorcall),
   31686             : #endif
   31687             :     0,
   31688             :     0,
   31689             : #if PY_MAJOR_VERSION < 3
   31690             :     0,
   31691             : #else
   31692             :     0,
   31693             : #endif
   31694             :     (reprfunc) __Pyx_CyFunction_repr,
   31695             :     0,
   31696             :     0,
   31697             :     0,
   31698             :     0,
   31699             :     __Pyx_CyFunction_CallAsMethod,
   31700             :     0,
   31701             :     0,
   31702             :     0,
   31703             :     0,
   31704             : #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
   31705             :     Py_TPFLAGS_METHOD_DESCRIPTOR |
   31706             : #endif
   31707             : #if defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL
   31708             :     _Py_TPFLAGS_HAVE_VECTORCALL |
   31709             : #endif
   31710             :     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
   31711             :     0,
   31712             :     (traverseproc) __Pyx_CyFunction_traverse,
   31713             :     (inquiry) __Pyx_CyFunction_clear,
   31714             :     0,
   31715             : #if PY_VERSION_HEX < 0x030500A0
   31716             :     offsetof(__pyx_CyFunctionObject, func_weakreflist),
   31717             : #else
   31718             :     offsetof(PyCFunctionObject, m_weakreflist),
   31719             : #endif
   31720             :     0,
   31721             :     0,
   31722             :     __pyx_CyFunction_methods,
   31723             :     __pyx_CyFunction_members,
   31724             :     __pyx_CyFunction_getsets,
   31725             :     0,
   31726             :     0,
   31727             :     __Pyx_PyMethod_New,
   31728             :     0,
   31729             :     offsetof(__pyx_CyFunctionObject, func_dict),
   31730             :     0,
   31731             :     0,
   31732             :     0,
   31733             :     0,
   31734             :     0,
   31735             :     0,
   31736             :     0,
   31737             :     0,
   31738             :     0,
   31739             :     0,
   31740             :     0,
   31741             :     0,
   31742             : #if PY_VERSION_HEX >= 0x030400a1
   31743             :     0,
   31744             : #endif
   31745             : #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
   31746             :     0,
   31747             : #endif
   31748             : #if __PYX_NEED_TP_PRINT_SLOT
   31749             :     0,
   31750             : #endif
   31751             : #if PY_VERSION_HEX >= 0x030C0000
   31752             :     0,
   31753             : #endif
   31754             : #if PY_VERSION_HEX >= 0x030d00A4
   31755             :     0,
   31756             : #endif
   31757             : #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
   31758             :     0,
   31759             : #endif
   31760             : };
   31761             : #endif
   31762           1 : static int __pyx_CyFunction_init(PyObject *module) {
   31763             : #if CYTHON_USE_TYPE_SPECS
   31764             :     __pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_CyFunctionType_spec, NULL);
   31765             : #else
   31766           1 :     CYTHON_UNUSED_VAR(module);
   31767           1 :     __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
   31768             : #endif
   31769           1 :     if (unlikely(__pyx_CyFunctionType == NULL)) {
   31770           0 :         return -1;
   31771             :     }
   31772             :     return 0;
   31773             : }
   31774             : static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
   31775             :     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
   31776             :     m->defaults = PyObject_Malloc(size);
   31777             :     if (unlikely(!m->defaults))
   31778             :         return PyErr_NoMemory();
   31779             :     memset(m->defaults, 0, size);
   31780             :     m->defaults_pyobjects = pyobjects;
   31781             :     m->defaults_size = size;
   31782             :     return m->defaults;
   31783             : }
   31784             : static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
   31785             :     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
   31786             :     m->defaults_tuple = tuple;
   31787             :     Py_INCREF(tuple);
   31788             : }
   31789             : static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
   31790             :     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
   31791             :     m->defaults_kwdict = dict;
   31792             :     Py_INCREF(dict);
   31793             : }
   31794             : static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
   31795             :     __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
   31796             :     m->func_annotations = dict;
   31797             :     Py_INCREF(dict);
   31798             : }
   31799             : 
   31800             : /* CythonFunction */
   31801           1 :   static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
   31802             :                                       PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
   31803           1 :     PyObject *op = __Pyx_CyFunction_Init(
   31804           1 :         PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
   31805             :         ml, flags, qualname, closure, module, globals, code
   31806             :     );
   31807           1 :     if (likely(op)) {
   31808           1 :         PyObject_GC_Track(op);
   31809             :     }
   31810           1 :     return op;
   31811             : }
   31812             : 
   31813             : /* CLineInTraceback */
   31814             :   #ifndef CYTHON_CLINE_IN_TRACEBACK
   31815           0 : static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
   31816           0 :     PyObject *use_cline;
   31817           0 :     PyObject *ptype, *pvalue, *ptraceback;
   31818             : #if CYTHON_COMPILING_IN_CPYTHON
   31819           0 :     PyObject **cython_runtime_dict;
   31820             : #endif
   31821           0 :     CYTHON_MAYBE_UNUSED_VAR(tstate);
   31822           0 :     if (unlikely(!__pyx_cython_runtime)) {
   31823             :         return c_line;
   31824             :     }
   31825           0 :     __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
   31826             : #if CYTHON_COMPILING_IN_CPYTHON
   31827           0 :     cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
   31828           0 :     if (likely(cython_runtime_dict)) {
   31829           0 :         __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
   31830             :             use_cline, *cython_runtime_dict,
   31831             :             __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
   31832             :     } else
   31833             : #endif
   31834             :     {
   31835           0 :       PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
   31836           0 :       if (use_cline_obj) {
   31837           0 :         use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
   31838           0 :         Py_DECREF(use_cline_obj);
   31839             :       } else {
   31840           0 :         PyErr_Clear();
   31841           0 :         use_cline = NULL;
   31842             :       }
   31843             :     }
   31844           0 :     if (!use_cline) {
   31845           0 :         c_line = 0;
   31846           0 :         (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
   31847             :     }
   31848           0 :     else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
   31849             :         c_line = 0;
   31850             :     }
   31851           0 :     __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
   31852           0 :     return c_line;
   31853             : }
   31854             : #endif
   31855             : 
   31856             : /* CodeObjectCache */
   31857             :   #if !CYTHON_COMPILING_IN_LIMITED_API
   31858           0 : static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
   31859           0 :     int start = 0, mid = 0, end = count - 1;
   31860           0 :     if (end >= 0 && code_line > entries[end].code_line) {
   31861             :         return count;
   31862             :     }
   31863           0 :     while (start < end) {
   31864           0 :         mid = start + (end - start) / 2;
   31865           0 :         if (code_line < entries[mid].code_line) {
   31866             :             end = mid;
   31867           0 :         } else if (code_line > entries[mid].code_line) {
   31868           0 :              start = mid + 1;
   31869             :         } else {
   31870           0 :             return mid;
   31871             :         }
   31872             :     }
   31873           0 :     if (code_line <= entries[mid].code_line) {
   31874             :         return mid;
   31875             :     } else {
   31876           0 :         return mid + 1;
   31877             :     }
   31878             : }
   31879           0 : static PyCodeObject *__pyx_find_code_object(int code_line) {
   31880           0 :     PyCodeObject* code_object;
   31881           0 :     int pos;
   31882           0 :     if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
   31883             :         return NULL;
   31884             :     }
   31885           0 :     pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
   31886           0 :     if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
   31887             :         return NULL;
   31888             :     }
   31889           0 :     code_object = __pyx_code_cache.entries[pos].code_object;
   31890           0 :     Py_INCREF(code_object);
   31891             :     return code_object;
   31892             : }
   31893           0 : static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
   31894           0 :     int pos, i;
   31895           0 :     __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
   31896           0 :     if (unlikely(!code_line)) {
   31897             :         return;
   31898             :     }
   31899           0 :     if (unlikely(!entries)) {
   31900           0 :         entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
   31901           0 :         if (likely(entries)) {
   31902           0 :             __pyx_code_cache.entries = entries;
   31903           0 :             __pyx_code_cache.max_count = 64;
   31904           0 :             __pyx_code_cache.count = 1;
   31905           0 :             entries[0].code_line = code_line;
   31906           0 :             entries[0].code_object = code_object;
   31907           0 :             Py_INCREF(code_object);
   31908             :         }
   31909           0 :         return;
   31910             :     }
   31911           0 :     pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
   31912           0 :     if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
   31913           0 :         PyCodeObject* tmp = entries[pos].code_object;
   31914           0 :         entries[pos].code_object = code_object;
   31915           0 :         Py_DECREF(tmp);
   31916           0 :         return;
   31917             :     }
   31918           0 :     if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
   31919           0 :         int new_max = __pyx_code_cache.max_count + 64;
   31920           0 :         entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
   31921           0 :             __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
   31922           0 :         if (unlikely(!entries)) {
   31923             :             return;
   31924             :         }
   31925           0 :         __pyx_code_cache.entries = entries;
   31926           0 :         __pyx_code_cache.max_count = new_max;
   31927             :     }
   31928           0 :     for (i=__pyx_code_cache.count; i>pos; i--) {
   31929           0 :         entries[i] = entries[i-1];
   31930             :     }
   31931           0 :     entries[pos].code_line = code_line;
   31932           0 :     entries[pos].code_object = code_object;
   31933           0 :     __pyx_code_cache.count++;
   31934           0 :     Py_INCREF(code_object);
   31935             : }
   31936             : #endif
   31937             : 
   31938             : /* AddTraceback */
   31939             :   #include "compile.h"
   31940             : #include "frameobject.h"
   31941             : #include "traceback.h"
   31942             : #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API
   31943             :   #ifndef Py_BUILD_CORE
   31944             :     #define Py_BUILD_CORE 1
   31945             :   #endif
   31946             :   #include "internal/pycore_frame.h"
   31947             : #endif
   31948             : #if CYTHON_COMPILING_IN_LIMITED_API
   31949             : static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict,
   31950             :                                                        PyObject *firstlineno, PyObject *name) {
   31951             :     PyObject *replace = NULL;
   31952             :     if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL;
   31953             :     if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL;
   31954             :     replace = PyObject_GetAttrString(code, "replace");
   31955             :     if (likely(replace)) {
   31956             :         PyObject *result;
   31957             :         result = PyObject_Call(replace, __pyx_empty_tuple, scratch_dict);
   31958             :         Py_DECREF(replace);
   31959             :         return result;
   31960             :     }
   31961             :     PyErr_Clear();
   31962             :     #if __PYX_LIMITED_VERSION_HEX < 0x030780000
   31963             :     {
   31964             :         PyObject *compiled = NULL, *result = NULL;
   31965             :         if (unlikely(PyDict_SetItemString(scratch_dict, "code", code))) return NULL;
   31966             :         if (unlikely(PyDict_SetItemString(scratch_dict, "type", (PyObject*)(&PyType_Type)))) return NULL;
   31967             :         compiled = Py_CompileString(
   31968             :             "out = type(code)(\n"
   31969             :             "  code.co_argcount, code.co_kwonlyargcount, code.co_nlocals, code.co_stacksize,\n"
   31970             :             "  code.co_flags, code.co_code, code.co_consts, code.co_names,\n"
   31971             :             "  code.co_varnames, code.co_filename, co_name, co_firstlineno,\n"
   31972             :             "  code.co_lnotab)\n", "<dummy>", Py_file_input);
   31973             :         if (!compiled) return NULL;
   31974             :         result = PyEval_EvalCode(compiled, scratch_dict, scratch_dict);
   31975             :         Py_DECREF(compiled);
   31976             :         if (!result) PyErr_Print();
   31977             :         Py_DECREF(result);
   31978             :         result = PyDict_GetItemString(scratch_dict, "out");
   31979             :         if (result) Py_INCREF(result);
   31980             :         return result;
   31981             :     }
   31982             :     #else
   31983             :     return NULL;
   31984             :     #endif
   31985             : }
   31986             : static void __Pyx_AddTraceback(const char *funcname, int c_line,
   31987             :                                int py_line, const char *filename) {
   31988             :     PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL;
   31989             :     PyObject *replace = NULL, *getframe = NULL, *frame = NULL;
   31990             :     PyObject *exc_type, *exc_value, *exc_traceback;
   31991             :     int success = 0;
   31992             :     if (c_line) {
   31993             :         (void) __pyx_cfilenm;
   31994             :         (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
   31995             :     }
   31996             :     PyErr_Fetch(&exc_type, &exc_value, &exc_traceback);
   31997             :     code_object = Py_CompileString("_getframe()", filename, Py_eval_input);
   31998             :     if (unlikely(!code_object)) goto bad;
   31999             :     py_py_line = PyLong_FromLong(py_line);
   32000             :     if (unlikely(!py_py_line)) goto bad;
   32001             :     py_funcname = PyUnicode_FromString(funcname);
   32002             :     if (unlikely(!py_funcname)) goto bad;
   32003             :     dict = PyDict_New();
   32004             :     if (unlikely(!dict)) goto bad;
   32005             :     {
   32006             :         PyObject *old_code_object = code_object;
   32007             :         code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname);
   32008             :         Py_DECREF(old_code_object);
   32009             :     }
   32010             :     if (unlikely(!code_object)) goto bad;
   32011             :     getframe = PySys_GetObject("_getframe");
   32012             :     if (unlikely(!getframe)) goto bad;
   32013             :     if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad;
   32014             :     frame = PyEval_EvalCode(code_object, dict, dict);
   32015             :     if (unlikely(!frame) || frame == Py_None) goto bad;
   32016             :     success = 1;
   32017             :   bad:
   32018             :     PyErr_Restore(exc_type, exc_value, exc_traceback);
   32019             :     Py_XDECREF(code_object);
   32020             :     Py_XDECREF(py_py_line);
   32021             :     Py_XDECREF(py_funcname);
   32022             :     Py_XDECREF(dict);
   32023             :     Py_XDECREF(replace);
   32024             :     if (success) {
   32025             :         PyTraceBack_Here(
   32026             :             (struct _frame*)frame);
   32027             :     }
   32028             :     Py_XDECREF(frame);
   32029             : }
   32030             : #else
   32031           0 : static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
   32032             :             const char *funcname, int c_line,
   32033             :             int py_line, const char *filename) {
   32034           0 :     PyCodeObject *py_code = NULL;
   32035           0 :     PyObject *py_funcname = NULL;
   32036             :     #if PY_MAJOR_VERSION < 3
   32037             :     PyObject *py_srcfile = NULL;
   32038             :     py_srcfile = PyString_FromString(filename);
   32039             :     if (!py_srcfile) goto bad;
   32040             :     #endif
   32041           0 :     if (c_line) {
   32042             :         #if PY_MAJOR_VERSION < 3
   32043             :         py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
   32044             :         if (!py_funcname) goto bad;
   32045             :         #else
   32046           0 :         py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
   32047           0 :         if (!py_funcname) goto bad;
   32048           0 :         funcname = PyUnicode_AsUTF8(py_funcname);
   32049           0 :         if (!funcname) goto bad;
   32050             :         #endif
   32051             :     }
   32052             :     else {
   32053             :         #if PY_MAJOR_VERSION < 3
   32054             :         py_funcname = PyString_FromString(funcname);
   32055             :         if (!py_funcname) goto bad;
   32056             :         #endif
   32057           0 :     }
   32058             :     #if PY_MAJOR_VERSION < 3
   32059             :     py_code = __Pyx_PyCode_New(
   32060             :         0,
   32061             :         0,
   32062             :         0,
   32063             :         0,
   32064             :         0,
   32065             :         0,
   32066             :         __pyx_empty_bytes, /*PyObject *code,*/
   32067             :         __pyx_empty_tuple, /*PyObject *consts,*/
   32068             :         __pyx_empty_tuple, /*PyObject *names,*/
   32069             :         __pyx_empty_tuple, /*PyObject *varnames,*/
   32070             :         __pyx_empty_tuple, /*PyObject *freevars,*/
   32071             :         __pyx_empty_tuple, /*PyObject *cellvars,*/
   32072             :         py_srcfile,   /*PyObject *filename,*/
   32073             :         py_funcname,  /*PyObject *name,*/
   32074             :         py_line,
   32075             :         __pyx_empty_bytes  /*PyObject *lnotab*/
   32076             :     );
   32077             :     Py_DECREF(py_srcfile);
   32078             :     #else
   32079           0 :     py_code = PyCode_NewEmpty(filename, funcname, py_line);
   32080             :     #endif
   32081           0 :     Py_XDECREF(py_funcname);
   32082           0 :     return py_code;
   32083           0 : bad:
   32084           0 :     Py_XDECREF(py_funcname);
   32085             :     #if PY_MAJOR_VERSION < 3
   32086             :     Py_XDECREF(py_srcfile);
   32087             :     #endif
   32088           0 :     return NULL;
   32089             : }
   32090           0 : static void __Pyx_AddTraceback(const char *funcname, int c_line,
   32091             :                                int py_line, const char *filename) {
   32092           0 :     PyCodeObject *py_code = 0;
   32093           0 :     PyFrameObject *py_frame = 0;
   32094           0 :     PyThreadState *tstate = __Pyx_PyThreadState_Current;
   32095           0 :     PyObject *ptype, *pvalue, *ptraceback;
   32096           0 :     if (c_line) {
   32097           0 :         c_line = __Pyx_CLineForTraceback(tstate, c_line);
   32098             :     }
   32099           0 :     py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
   32100           0 :     if (!py_code) {
   32101           0 :         __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
   32102           0 :         py_code = __Pyx_CreateCodeObjectForTraceback(
   32103             :             funcname, c_line, py_line, filename);
   32104           0 :         if (!py_code) {
   32105             :             /* If the code object creation fails, then we should clear the
   32106             :                fetched exception references and propagate the new exception */
   32107           0 :             Py_XDECREF(ptype);
   32108           0 :             Py_XDECREF(pvalue);
   32109           0 :             Py_XDECREF(ptraceback);
   32110           0 :             goto bad;
   32111             :         }
   32112           0 :         __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
   32113           0 :         __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
   32114             :     }
   32115           0 :     py_frame = PyFrame_New(
   32116             :         tstate,            /*PyThreadState *tstate,*/
   32117             :         py_code,           /*PyCodeObject *code,*/
   32118           0 :         __pyx_d,    /*PyObject *globals,*/
   32119             :         0                  /*PyObject *locals*/
   32120             :     );
   32121           0 :     if (!py_frame) goto bad;
   32122           0 :     __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
   32123           0 :     PyTraceBack_Here(py_frame);
   32124           0 : bad:
   32125           0 :     Py_XDECREF(py_code);
   32126           0 :     Py_XDECREF(py_frame);
   32127           0 : }
   32128             : #endif
   32129             : 
   32130             : #if PY_MAJOR_VERSION < 3
   32131             : static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {
   32132             :     __Pyx_TypeName obj_type_name;
   32133             :     if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags);
   32134             :         if (__Pyx_TypeCheck(obj, __pyx_array_type)) return __pyx_array_getbuffer(obj, view, flags);
   32135             :         if (__Pyx_TypeCheck(obj, __pyx_memoryview_type)) return __pyx_memoryview_getbuffer(obj, view, flags);
   32136             :     obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
   32137             :     PyErr_Format(PyExc_TypeError,
   32138             :                  "'" __Pyx_FMT_TYPENAME "' does not have the buffer interface",
   32139             :                  obj_type_name);
   32140             :     __Pyx_DECREF_TypeName(obj_type_name);
   32141             :     return -1;
   32142             : }
   32143             : static void __Pyx_ReleaseBuffer(Py_buffer *view) {
   32144             :     PyObject *obj = view->obj;
   32145             :     if (!obj) return;
   32146             :     if (PyObject_CheckBuffer(obj)) {
   32147             :         PyBuffer_Release(view);
   32148             :         return;
   32149             :     }
   32150             :     if ((0)) {}
   32151             :     view->obj = NULL;
   32152             :     Py_DECREF(obj);
   32153             : }
   32154             : #endif
   32155             : 
   32156             : 
   32157             :   /* MemviewSliceIsContig */
   32158             :   static int
   32159           0 : __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim)
   32160             : {
   32161           0 :     int i, index, step, start;
   32162           0 :     Py_ssize_t itemsize = mvs.memview->view.itemsize;
   32163           0 :     if (order == 'F') {
   32164             :         step = 1;
   32165             :         start = 0;
   32166             :     } else {
   32167           0 :         step = -1;
   32168           0 :         start = ndim - 1;
   32169             :     }
   32170           0 :     for (i = 0; i < ndim; i++) {
   32171           0 :         index = start + step * i;
   32172           0 :         if (mvs.suboffsets[index] >= 0 || mvs.strides[index] != itemsize)
   32173             :             return 0;
   32174           0 :         itemsize *= mvs.shape[index];
   32175             :     }
   32176             :     return 1;
   32177             : }
   32178             : 
   32179             : /* OverlappingSlices */
   32180             :   static void
   32181           0 : __pyx_get_array_memory_extents(__Pyx_memviewslice *slice,
   32182             :                                void **out_start, void **out_end,
   32183             :                                int ndim, size_t itemsize)
   32184             : {
   32185           0 :     char *start, *end;
   32186           0 :     int i;
   32187           0 :     start = end = slice->data;
   32188           0 :     for (i = 0; i < ndim; i++) {
   32189           0 :         Py_ssize_t stride = slice->strides[i];
   32190           0 :         Py_ssize_t extent = slice->shape[i];
   32191           0 :         if (extent == 0) {
   32192           0 :             *out_start = *out_end = start;
   32193           0 :             return;
   32194             :         } else {
   32195           0 :             if (stride > 0)
   32196           0 :                 end += stride * (extent - 1);
   32197             :             else
   32198           0 :                 start += stride * (extent - 1);
   32199             :         }
   32200             :     }
   32201           0 :     *out_start = start;
   32202           0 :     *out_end = end + itemsize;
   32203             : }
   32204             : static int
   32205           0 : __pyx_slices_overlap(__Pyx_memviewslice *slice1,
   32206             :                      __Pyx_memviewslice *slice2,
   32207             :                      int ndim, size_t itemsize)
   32208             : {
   32209           0 :     void *start1, *end1, *start2, *end2;
   32210           0 :     __pyx_get_array_memory_extents(slice1, &start1, &end1, ndim, itemsize);
   32211           0 :     __pyx_get_array_memory_extents(slice2, &start2, &end2, ndim, itemsize);
   32212           0 :     return (start1 < end2) && (start2 < end1);
   32213             : }
   32214             : 
   32215             : /* Declarations */
   32216             :   #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
   32217             :   #ifdef __cplusplus
   32218             :     static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
   32219             :       return ::std::complex< float >(x, y);
   32220             :     }
   32221             :   #else
   32222             :     static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
   32223             :       return x + y*(__pyx_t_float_complex)_Complex_I;
   32224             :     }
   32225             :   #endif
   32226             : #else
   32227             :     static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
   32228             :       __pyx_t_float_complex z;
   32229          36 :       z.real = x;
   32230          36 :       z.imag = y;
   32231             :       return z;
   32232             :     }
   32233             : #endif
   32234             : 
   32235             : /* Arithmetic */
   32236             :   #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
   32237             : #else
   32238             :     static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
   32239             :        return (a.real == b.real) && (a.imag == b.imag);
   32240             :     }
   32241             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
   32242             :         __pyx_t_float_complex z;
   32243             :         z.real = a.real + b.real;
   32244             :         z.imag = a.imag + b.imag;
   32245             :         return z;
   32246             :     }
   32247             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
   32248             :         __pyx_t_float_complex z;
   32249             :         z.real = a.real - b.real;
   32250             :         z.imag = a.imag - b.imag;
   32251             :         return z;
   32252             :     }
   32253             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
   32254             :         __pyx_t_float_complex z;
   32255             :         z.real = a.real * b.real - a.imag * b.imag;
   32256             :         z.imag = a.real * b.imag + a.imag * b.real;
   32257             :         return z;
   32258             :     }
   32259             :     #if 1
   32260             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
   32261             :         if (b.imag == 0) {
   32262             :             return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
   32263             :         } else if (fabsf(b.real) >= fabsf(b.imag)) {
   32264             :             if (b.real == 0 && b.imag == 0) {
   32265             :                 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
   32266             :             } else {
   32267             :                 float r = b.imag / b.real;
   32268             :                 float s = (float)(1.0) / (b.real + b.imag * r);
   32269             :                 return __pyx_t_float_complex_from_parts(
   32270             :                     (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
   32271             :             }
   32272             :         } else {
   32273             :             float r = b.real / b.imag;
   32274             :             float s = (float)(1.0) / (b.imag + b.real * r);
   32275             :             return __pyx_t_float_complex_from_parts(
   32276             :                 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
   32277             :         }
   32278             :     }
   32279             :     #else
   32280             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
   32281             :         if (b.imag == 0) {
   32282             :             return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
   32283             :         } else {
   32284             :             float denom = b.real * b.real + b.imag * b.imag;
   32285             :             return __pyx_t_float_complex_from_parts(
   32286             :                 (a.real * b.real + a.imag * b.imag) / denom,
   32287             :                 (a.imag * b.real - a.real * b.imag) / denom);
   32288             :         }
   32289             :     }
   32290             :     #endif
   32291             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
   32292             :         __pyx_t_float_complex z;
   32293             :         z.real = -a.real;
   32294             :         z.imag = -a.imag;
   32295             :         return z;
   32296             :     }
   32297             :     static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
   32298             :        return (a.real == 0) && (a.imag == 0);
   32299             :     }
   32300             :     static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
   32301             :         __pyx_t_float_complex z;
   32302             :         z.real =  a.real;
   32303             :         z.imag = -a.imag;
   32304             :         return z;
   32305             :     }
   32306             :     #if 1
   32307             :         static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
   32308             :           #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
   32309             :             return sqrtf(z.real*z.real + z.imag*z.imag);
   32310             :           #else
   32311             :             return hypotf(z.real, z.imag);
   32312             :           #endif
   32313             :         }
   32314             :         static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
   32315             :             __pyx_t_float_complex z;
   32316             :             float r, lnr, theta, z_r, z_theta;
   32317             :             if (b.imag == 0 && b.real == (int)b.real) {
   32318             :                 if (b.real < 0) {
   32319             :                     float denom = a.real * a.real + a.imag * a.imag;
   32320             :                     a.real = a.real / denom;
   32321             :                     a.imag = -a.imag / denom;
   32322             :                     b.real = -b.real;
   32323             :                 }
   32324             :                 switch ((int)b.real) {
   32325             :                     case 0:
   32326             :                         z.real = 1;
   32327             :                         z.imag = 0;
   32328             :                         return z;
   32329             :                     case 1:
   32330             :                         return a;
   32331             :                     case 2:
   32332             :                         return __Pyx_c_prod_float(a, a);
   32333             :                     case 3:
   32334             :                         z = __Pyx_c_prod_float(a, a);
   32335             :                         return __Pyx_c_prod_float(z, a);
   32336             :                     case 4:
   32337             :                         z = __Pyx_c_prod_float(a, a);
   32338             :                         return __Pyx_c_prod_float(z, z);
   32339             :                 }
   32340             :             }
   32341             :             if (a.imag == 0) {
   32342             :                 if (a.real == 0) {
   32343             :                     return a;
   32344             :                 } else if ((b.imag == 0) && (a.real >= 0)) {
   32345             :                     z.real = powf(a.real, b.real);
   32346             :                     z.imag = 0;
   32347             :                     return z;
   32348             :                 } else if (a.real > 0) {
   32349             :                     r = a.real;
   32350             :                     theta = 0;
   32351             :                 } else {
   32352             :                     r = -a.real;
   32353             :                     theta = atan2f(0.0, -1.0);
   32354             :                 }
   32355             :             } else {
   32356             :                 r = __Pyx_c_abs_float(a);
   32357             :                 theta = atan2f(a.imag, a.real);
   32358             :             }
   32359             :             lnr = logf(r);
   32360             :             z_r = expf(lnr * b.real - theta * b.imag);
   32361             :             z_theta = theta * b.real + lnr * b.imag;
   32362             :             z.real = z_r * cosf(z_theta);
   32363             :             z.imag = z_r * sinf(z_theta);
   32364             :             return z;
   32365             :         }
   32366             :     #endif
   32367             : #endif
   32368             : 
   32369             : /* Declarations */
   32370             :   #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
   32371             :   #ifdef __cplusplus
   32372             :     static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
   32373             :       return ::std::complex< double >(x, y);
   32374             :     }
   32375             :   #else
   32376             :     static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
   32377             :       return x + y*(__pyx_t_double_complex)_Complex_I;
   32378             :     }
   32379             :   #endif
   32380             : #else
   32381             :     static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
   32382             :       __pyx_t_double_complex z;
   32383         671 :       z.real = x;
   32384         614 :       z.imag = y;
   32385             :       return z;
   32386             :     }
   32387             : #endif
   32388             : 
   32389             : /* Arithmetic */
   32390             :   #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
   32391             : #else
   32392             :     static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
   32393             :        return (a.real == b.real) && (a.imag == b.imag);
   32394             :     }
   32395             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
   32396             :         __pyx_t_double_complex z;
   32397             :         z.real = a.real + b.real;
   32398             :         z.imag = a.imag + b.imag;
   32399             :         return z;
   32400             :     }
   32401             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
   32402             :         __pyx_t_double_complex z;
   32403             :         z.real = a.real - b.real;
   32404             :         z.imag = a.imag - b.imag;
   32405             :         return z;
   32406             :     }
   32407             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
   32408             :         __pyx_t_double_complex z;
   32409             :         z.real = a.real * b.real - a.imag * b.imag;
   32410             :         z.imag = a.real * b.imag + a.imag * b.real;
   32411             :         return z;
   32412             :     }
   32413             :     #if 1
   32414             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
   32415             :         if (b.imag == 0) {
   32416             :             return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
   32417             :         } else if (fabs(b.real) >= fabs(b.imag)) {
   32418             :             if (b.real == 0 && b.imag == 0) {
   32419             :                 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
   32420             :             } else {
   32421             :                 double r = b.imag / b.real;
   32422             :                 double s = (double)(1.0) / (b.real + b.imag * r);
   32423             :                 return __pyx_t_double_complex_from_parts(
   32424             :                     (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
   32425             :             }
   32426             :         } else {
   32427             :             double r = b.real / b.imag;
   32428             :             double s = (double)(1.0) / (b.imag + b.real * r);
   32429             :             return __pyx_t_double_complex_from_parts(
   32430             :                 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
   32431             :         }
   32432             :     }
   32433             :     #else
   32434             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
   32435             :         if (b.imag == 0) {
   32436             :             return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
   32437             :         } else {
   32438             :             double denom = b.real * b.real + b.imag * b.imag;
   32439             :             return __pyx_t_double_complex_from_parts(
   32440             :                 (a.real * b.real + a.imag * b.imag) / denom,
   32441             :                 (a.imag * b.real - a.real * b.imag) / denom);
   32442             :         }
   32443             :     }
   32444             :     #endif
   32445             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
   32446             :         __pyx_t_double_complex z;
   32447             :         z.real = -a.real;
   32448             :         z.imag = -a.imag;
   32449             :         return z;
   32450             :     }
   32451             :     static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
   32452             :        return (a.real == 0) && (a.imag == 0);
   32453             :     }
   32454             :     static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
   32455             :         __pyx_t_double_complex z;
   32456             :         z.real =  a.real;
   32457             :         z.imag = -a.imag;
   32458             :         return z;
   32459             :     }
   32460             :     #if 1
   32461             :         static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
   32462             :           #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
   32463             :             return sqrt(z.real*z.real + z.imag*z.imag);
   32464             :           #else
   32465             :             return hypot(z.real, z.imag);
   32466             :           #endif
   32467             :         }
   32468             :         static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
   32469             :             __pyx_t_double_complex z;
   32470             :             double r, lnr, theta, z_r, z_theta;
   32471             :             if (b.imag == 0 && b.real == (int)b.real) {
   32472             :                 if (b.real < 0) {
   32473             :                     double denom = a.real * a.real + a.imag * a.imag;
   32474             :                     a.real = a.real / denom;
   32475             :                     a.imag = -a.imag / denom;
   32476             :                     b.real = -b.real;
   32477             :                 }
   32478             :                 switch ((int)b.real) {
   32479             :                     case 0:
   32480             :                         z.real = 1;
   32481             :                         z.imag = 0;
   32482             :                         return z;
   32483             :                     case 1:
   32484             :                         return a;
   32485             :                     case 2:
   32486             :                         return __Pyx_c_prod_double(a, a);
   32487             :                     case 3:
   32488             :                         z = __Pyx_c_prod_double(a, a);
   32489             :                         return __Pyx_c_prod_double(z, a);
   32490             :                     case 4:
   32491             :                         z = __Pyx_c_prod_double(a, a);
   32492             :                         return __Pyx_c_prod_double(z, z);
   32493             :                 }
   32494             :             }
   32495             :             if (a.imag == 0) {
   32496             :                 if (a.real == 0) {
   32497             :                     return a;
   32498             :                 } else if ((b.imag == 0) && (a.real >= 0)) {
   32499             :                     z.real = pow(a.real, b.real);
   32500             :                     z.imag = 0;
   32501             :                     return z;
   32502             :                 } else if (a.real > 0) {
   32503             :                     r = a.real;
   32504             :                     theta = 0;
   32505             :                 } else {
   32506             :                     r = -a.real;
   32507             :                     theta = atan2(0.0, -1.0);
   32508             :                 }
   32509             :             } else {
   32510             :                 r = __Pyx_c_abs_double(a);
   32511             :                 theta = atan2(a.imag, a.real);
   32512             :             }
   32513             :             lnr = log(r);
   32514             :             z_r = exp(lnr * b.real - theta * b.imag);
   32515             :             z_theta = theta * b.real + lnr * b.imag;
   32516             :             z.real = z_r * cos(z_theta);
   32517             :             z.imag = z_r * sin(z_theta);
   32518             :             return z;
   32519             :         }
   32520             :     #endif
   32521             : #endif
   32522             : 
   32523             : /* CIntFromPyVerify */
   32524             :   #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
   32525             :     __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
   32526             : #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
   32527             :     __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
   32528             : #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
   32529             :     {\
   32530             :         func_type value = func_value;\
   32531             :         if (sizeof(target_type) < sizeof(func_type)) {\
   32532             :             if (unlikely(value != (func_type) (target_type) value)) {\
   32533             :                 func_type zero = 0;\
   32534             :                 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
   32535             :                     return (target_type) -1;\
   32536             :                 if (is_unsigned && unlikely(value < zero))\
   32537             :                     goto raise_neg_overflow;\
   32538             :                 else\
   32539             :                     goto raise_overflow;\
   32540             :             }\
   32541             :         }\
   32542             :         return (target_type) value;\
   32543             :     }
   32544             : 
   32545             : /* TypeInfoCompare */
   32546             :   static int
   32547           0 : __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b)
   32548             : {
   32549           0 :     int i;
   32550           0 :     if (!a || !b)
   32551             :         return 0;
   32552           0 :     if (a == b)
   32553             :         return 1;
   32554           0 :     if (a->size != b->size || a->typegroup != b->typegroup ||
   32555           0 :             a->is_unsigned != b->is_unsigned || a->ndim != b->ndim) {
   32556           0 :         if (a->typegroup == 'H' || b->typegroup == 'H') {
   32557           0 :             return a->size == b->size;
   32558             :         } else {
   32559             :             return 0;
   32560             :         }
   32561             :     }
   32562           0 :     if (a->ndim) {
   32563           0 :         for (i = 0; i < a->ndim; i++)
   32564           0 :             if (a->arraysize[i] != b->arraysize[i])
   32565             :                 return 0;
   32566             :     }
   32567           0 :     if (a->typegroup == 'S') {
   32568           0 :         if (a->flags != b->flags)
   32569             :             return 0;
   32570           0 :         if (a->fields || b->fields) {
   32571           0 :             if (!(a->fields && b->fields))
   32572             :                 return 0;
   32573           0 :             for (i = 0; a->fields[i].type && b->fields[i].type; i++) {
   32574           0 :                 __Pyx_StructField *field_a = a->fields + i;
   32575           0 :                 __Pyx_StructField *field_b = b->fields + i;
   32576           0 :                 if (field_a->offset != field_b->offset ||
   32577           0 :                     !__pyx_typeinfo_cmp(field_a->type, field_b->type))
   32578           0 :                     return 0;
   32579             :             }
   32580           0 :             return !a->fields[i].type && !b->fields[i].type;
   32581             :         }
   32582             :     }
   32583             :     return 1;
   32584             : }
   32585             : 
   32586             : /* MemviewSliceValidateAndInit */
   32587             :   static int
   32588         141 : __pyx_check_strides(Py_buffer *buf, int dim, int ndim, int spec)
   32589             : {
   32590         141 :     if (buf->shape[dim] <= 1)
   32591             :         return 1;
   32592         141 :     if (buf->strides) {
   32593         141 :         if (spec & __Pyx_MEMVIEW_CONTIG) {
   32594         141 :             if (spec & (__Pyx_MEMVIEW_PTR|__Pyx_MEMVIEW_FULL)) {
   32595           0 :                 if (unlikely(buf->strides[dim] != sizeof(void *))) {
   32596           0 :                     PyErr_Format(PyExc_ValueError,
   32597             :                                  "Buffer is not indirectly contiguous "
   32598             :                                  "in dimension %d.", dim);
   32599           0 :                     goto fail;
   32600             :                 }
   32601         141 :             } else if (unlikely(buf->strides[dim] != buf->itemsize)) {
   32602           0 :                 PyErr_SetString(PyExc_ValueError,
   32603             :                                 "Buffer and memoryview are not contiguous "
   32604             :                                 "in the same dimension.");
   32605           0 :                 goto fail;
   32606             :             }
   32607             :         }
   32608         141 :         if (spec & __Pyx_MEMVIEW_FOLLOW) {
   32609           0 :             Py_ssize_t stride = buf->strides[dim];
   32610           0 :             if (stride < 0)
   32611             :                 stride = -stride;
   32612           0 :             if (unlikely(stride < buf->itemsize)) {
   32613           0 :                 PyErr_SetString(PyExc_ValueError,
   32614             :                                 "Buffer and memoryview are not contiguous "
   32615             :                                 "in the same dimension.");
   32616           0 :                 goto fail;
   32617             :             }
   32618             :         }
   32619             :     } else {
   32620           0 :         if (unlikely(spec & __Pyx_MEMVIEW_CONTIG && dim != ndim - 1)) {
   32621           0 :             PyErr_Format(PyExc_ValueError,
   32622             :                          "C-contiguous buffer is not contiguous in "
   32623             :                          "dimension %d", dim);
   32624           0 :             goto fail;
   32625           0 :         } else if (unlikely(spec & (__Pyx_MEMVIEW_PTR))) {
   32626           0 :             PyErr_Format(PyExc_ValueError,
   32627             :                          "C-contiguous buffer is not indirect in "
   32628             :                          "dimension %d", dim);
   32629           0 :             goto fail;
   32630           0 :         } else if (unlikely(buf->suboffsets)) {
   32631           0 :             PyErr_SetString(PyExc_ValueError,
   32632             :                             "Buffer exposes suboffsets but no strides");
   32633           0 :             goto fail;
   32634             :         }
   32635             :     }
   32636             :     return 1;
   32637             : fail:
   32638             :     return 0;
   32639             : }
   32640             : static int
   32641         141 : __pyx_check_suboffsets(Py_buffer *buf, int dim, int ndim, int spec)
   32642             : {
   32643         141 :     CYTHON_UNUSED_VAR(ndim);
   32644         141 :     if (spec & __Pyx_MEMVIEW_DIRECT) {
   32645         141 :         if (unlikely(buf->suboffsets && buf->suboffsets[dim] >= 0)) {
   32646           0 :             PyErr_Format(PyExc_ValueError,
   32647             :                          "Buffer not compatible with direct access "
   32648             :                          "in dimension %d.", dim);
   32649           0 :             goto fail;
   32650             :         }
   32651             :     }
   32652         141 :     if (spec & __Pyx_MEMVIEW_PTR) {
   32653           0 :         if (unlikely(!buf->suboffsets || (buf->suboffsets[dim] < 0))) {
   32654           0 :             PyErr_Format(PyExc_ValueError,
   32655             :                          "Buffer is not indirectly accessible "
   32656             :                          "in dimension %d.", dim);
   32657           0 :             goto fail;
   32658             :         }
   32659             :     }
   32660             :     return 1;
   32661             : fail:
   32662             :     return 0;
   32663             : }
   32664             : static int
   32665         141 : __pyx_verify_contig(Py_buffer *buf, int ndim, int c_or_f_flag)
   32666             : {
   32667         141 :     int i;
   32668         141 :     if (c_or_f_flag & __Pyx_IS_F_CONTIG) {
   32669             :         Py_ssize_t stride = 1;
   32670           0 :         for (i = 0; i < ndim; i++) {
   32671           0 :             if (unlikely(stride * buf->itemsize != buf->strides[i]  &&  buf->shape[i] > 1)) {
   32672           0 :                 PyErr_SetString(PyExc_ValueError,
   32673             :                     "Buffer not fortran contiguous.");
   32674           0 :                 goto fail;
   32675             :             }
   32676           0 :             stride = stride * buf->shape[i];
   32677             :         }
   32678         141 :     } else if (c_or_f_flag & __Pyx_IS_C_CONTIG) {
   32679         141 :         Py_ssize_t stride = 1;
   32680         282 :         for (i = ndim - 1; i >- 1; i--) {
   32681         141 :             if (unlikely(stride * buf->itemsize != buf->strides[i]  &&  buf->shape[i] > 1)) {
   32682           0 :                 PyErr_SetString(PyExc_ValueError,
   32683             :                     "Buffer not C contiguous.");
   32684           0 :                 goto fail;
   32685             :             }
   32686         141 :             stride = stride * buf->shape[i];
   32687             :         }
   32688             :     }
   32689             :     return 1;
   32690             : fail:
   32691             :     return 0;
   32692             : }
   32693         141 : static int __Pyx_ValidateAndInit_memviewslice(
   32694             :                 int *axes_specs,
   32695             :                 int c_or_f_flag,
   32696             :                 int buf_flags,
   32697             :                 int ndim,
   32698             :                 __Pyx_TypeInfo *dtype,
   32699             :                 __Pyx_BufFmt_StackElem stack[],
   32700             :                 __Pyx_memviewslice *memviewslice,
   32701             :                 PyObject *original_obj)
   32702             : {
   32703         141 :     struct __pyx_memoryview_obj *memview, *new_memview;
   32704             :     __Pyx_RefNannyDeclarations
   32705         141 :     Py_buffer *buf;
   32706         141 :     int i, spec = 0, retval = -1;
   32707         141 :     __Pyx_BufFmt_Context ctx;
   32708         141 :     int from_memoryview = __pyx_memoryview_check(original_obj);
   32709         141 :     __Pyx_RefNannySetupContext("ValidateAndInit_memviewslice", 0);
   32710         141 :     if (from_memoryview && __pyx_typeinfo_cmp(dtype, ((struct __pyx_memoryview_obj *)
   32711             :                                                             original_obj)->typeinfo)) {
   32712             :         memview = (struct __pyx_memoryview_obj *) original_obj;
   32713             :         new_memview = NULL;
   32714             :     } else {
   32715         141 :         memview = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
   32716             :                                             original_obj, buf_flags, 0, dtype);
   32717         141 :         new_memview = memview;
   32718         141 :         if (unlikely(!memview))
   32719           0 :             goto fail;
   32720             :     }
   32721         141 :     buf = &memview->view;
   32722         141 :     if (unlikely(buf->ndim != ndim)) {
   32723           0 :         PyErr_Format(PyExc_ValueError,
   32724             :                 "Buffer has wrong number of dimensions (expected %d, got %d)",
   32725             :                 ndim, buf->ndim);
   32726           0 :         goto fail;
   32727             :     }
   32728         141 :     if (new_memview) {
   32729         141 :         __Pyx_BufFmt_Init(&ctx, stack, dtype);
   32730         141 :         if (unlikely(!__Pyx_BufFmt_CheckString(&ctx, buf->format))) goto fail;
   32731             :     }
   32732         141 :     if (unlikely((unsigned) buf->itemsize != dtype->size)) {
   32733           0 :         PyErr_Format(PyExc_ValueError,
   32734             :                      "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "u byte%s) "
   32735             :                      "does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "u byte%s)",
   32736             :                      buf->itemsize,
   32737             :                      (buf->itemsize > 1) ? "s" : "",
   32738             :                      dtype->name,
   32739             :                      dtype->size,
   32740             :                      (dtype->size > 1) ? "s" : "");
   32741           0 :         goto fail;
   32742             :     }
   32743         141 :     if (buf->len > 0) {
   32744         282 :         for (i = 0; i < ndim; i++) {
   32745         141 :             spec = axes_specs[i];
   32746         141 :             if (unlikely(!__pyx_check_strides(buf, i, ndim, spec)))
   32747           0 :                 goto fail;
   32748         141 :             if (unlikely(!__pyx_check_suboffsets(buf, i, ndim, spec)))
   32749           0 :                 goto fail;
   32750             :         }
   32751         141 :         if (unlikely(buf->strides && !__pyx_verify_contig(buf, ndim, c_or_f_flag)))
   32752           0 :             goto fail;
   32753             :     }
   32754         141 :     if (unlikely(__Pyx_init_memviewslice(memview, ndim, memviewslice,
   32755             :                                          new_memview != NULL) == -1)) {
   32756           0 :         goto fail;
   32757             :     }
   32758         141 :     retval = 0;
   32759         141 :     goto no_fail;
   32760           0 : fail:
   32761           0 :     Py_XDECREF(new_memview);
   32762           0 :     retval = -1;
   32763         141 : no_fail:
   32764         141 :     __Pyx_RefNannyFinishContext();
   32765         141 :     return retval;
   32766             : }
   32767             : 
   32768             : /* ObjectToMemviewSlice */
   32769         141 :   static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dc_int(PyObject *obj, int writable_flag) {
   32770         141 :     __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
   32771         141 :     __Pyx_BufFmt_StackElem stack[1];
   32772         141 :     int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_CONTIG) };
   32773         141 :     int retcode;
   32774         141 :     if (obj == Py_None) {
   32775           0 :         result.memview = (struct __pyx_memoryview_obj *) Py_None;
   32776           0 :         return result;
   32777             :     }
   32778         141 :     retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, __Pyx_IS_C_CONTIG,
   32779             :                                                  (PyBUF_C_CONTIGUOUS | PyBUF_FORMAT) | writable_flag, 1,
   32780             :                                                  &__Pyx_TypeInfo_int, stack,
   32781             :                                                  &result, obj);
   32782         141 :     if (unlikely(retcode == -1))
   32783           0 :         goto __pyx_fail;
   32784         141 :     return result;
   32785           0 : __pyx_fail:
   32786           0 :     result.memview = NULL;
   32787           0 :     result.data = NULL;
   32788           0 :     return result;
   32789             : }
   32790             : 
   32791             : /* Declarations */
   32792             :   #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
   32793             :   #ifdef __cplusplus
   32794             :     static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) {
   32795             :       return ::std::complex< long double >(x, y);
   32796             :     }
   32797             :   #else
   32798             :     static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) {
   32799             :       return x + y*(__pyx_t_long_double_complex)_Complex_I;
   32800             :     }
   32801             :   #endif
   32802             : #else
   32803             :     static CYTHON_INLINE __pyx_t_long_double_complex __pyx_t_long_double_complex_from_parts(long double x, long double y) {
   32804             :       __pyx_t_long_double_complex z;
   32805             :       z.real = x;
   32806             :       z.imag = y;
   32807             :       return z;
   32808             :     }
   32809             : #endif
   32810             : 
   32811             : /* Arithmetic */
   32812             :   #if CYTHON_CCOMPLEX && (1) && (!0 || __cplusplus)
   32813             : #else
   32814             :     static CYTHON_INLINE int __Pyx_c_eq_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
   32815             :        return (a.real == b.real) && (a.imag == b.imag);
   32816             :     }
   32817             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_sum_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
   32818             :         __pyx_t_long_double_complex z;
   32819             :         z.real = a.real + b.real;
   32820             :         z.imag = a.imag + b.imag;
   32821             :         return z;
   32822             :     }
   32823             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_diff_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
   32824             :         __pyx_t_long_double_complex z;
   32825             :         z.real = a.real - b.real;
   32826             :         z.imag = a.imag - b.imag;
   32827             :         return z;
   32828             :     }
   32829             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_prod_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
   32830             :         __pyx_t_long_double_complex z;
   32831             :         z.real = a.real * b.real - a.imag * b.imag;
   32832             :         z.imag = a.real * b.imag + a.imag * b.real;
   32833             :         return z;
   32834             :     }
   32835             :     #if 1
   32836             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
   32837             :         if (b.imag == 0) {
   32838             :             return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.real);
   32839             :         } else if (fabsl(b.real) >= fabsl(b.imag)) {
   32840             :             if (b.real == 0 && b.imag == 0) {
   32841             :                 return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
   32842             :             } else {
   32843             :                 long double r = b.imag / b.real;
   32844             :                 long double s = (long double)(1.0) / (b.real + b.imag * r);
   32845             :                 return __pyx_t_long_double_complex_from_parts(
   32846             :                     (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
   32847             :             }
   32848             :         } else {
   32849             :             long double r = b.real / b.imag;
   32850             :             long double s = (long double)(1.0) / (b.imag + b.real * r);
   32851             :             return __pyx_t_long_double_complex_from_parts(
   32852             :                 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
   32853             :         }
   32854             :     }
   32855             :     #else
   32856             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_quot_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
   32857             :         if (b.imag == 0) {
   32858             :             return __pyx_t_long_double_complex_from_parts(a.real / b.real, a.imag / b.real);
   32859             :         } else {
   32860             :             long double denom = b.real * b.real + b.imag * b.imag;
   32861             :             return __pyx_t_long_double_complex_from_parts(
   32862             :                 (a.real * b.real + a.imag * b.imag) / denom,
   32863             :                 (a.imag * b.real - a.real * b.imag) / denom);
   32864             :         }
   32865             :     }
   32866             :     #endif
   32867             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_neg_long__double(__pyx_t_long_double_complex a) {
   32868             :         __pyx_t_long_double_complex z;
   32869             :         z.real = -a.real;
   32870             :         z.imag = -a.imag;
   32871             :         return z;
   32872             :     }
   32873             :     static CYTHON_INLINE int __Pyx_c_is_zero_long__double(__pyx_t_long_double_complex a) {
   32874             :        return (a.real == 0) && (a.imag == 0);
   32875             :     }
   32876             :     static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_conj_long__double(__pyx_t_long_double_complex a) {
   32877             :         __pyx_t_long_double_complex z;
   32878             :         z.real =  a.real;
   32879             :         z.imag = -a.imag;
   32880             :         return z;
   32881             :     }
   32882             :     #if 1
   32883             :         static CYTHON_INLINE long double __Pyx_c_abs_long__double(__pyx_t_long_double_complex z) {
   32884             :           #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
   32885             :             return sqrtl(z.real*z.real + z.imag*z.imag);
   32886             :           #else
   32887             :             return hypotl(z.real, z.imag);
   32888             :           #endif
   32889             :         }
   32890             :         static CYTHON_INLINE __pyx_t_long_double_complex __Pyx_c_pow_long__double(__pyx_t_long_double_complex a, __pyx_t_long_double_complex b) {
   32891             :             __pyx_t_long_double_complex z;
   32892             :             long double r, lnr, theta, z_r, z_theta;
   32893             :             if (b.imag == 0 && b.real == (int)b.real) {
   32894             :                 if (b.real < 0) {
   32895             :                     long double denom = a.real * a.real + a.imag * a.imag;
   32896             :                     a.real = a.real / denom;
   32897             :                     a.imag = -a.imag / denom;
   32898             :                     b.real = -b.real;
   32899             :                 }
   32900             :                 switch ((int)b.real) {
   32901             :                     case 0:
   32902             :                         z.real = 1;
   32903             :                         z.imag = 0;
   32904             :                         return z;
   32905             :                     case 1:
   32906             :                         return a;
   32907             :                     case 2:
   32908             :                         return __Pyx_c_prod_long__double(a, a);
   32909             :                     case 3:
   32910             :                         z = __Pyx_c_prod_long__double(a, a);
   32911             :                         return __Pyx_c_prod_long__double(z, a);
   32912             :                     case 4:
   32913             :                         z = __Pyx_c_prod_long__double(a, a);
   32914             :                         return __Pyx_c_prod_long__double(z, z);
   32915             :                 }
   32916             :             }
   32917             :             if (a.imag == 0) {
   32918             :                 if (a.real == 0) {
   32919             :                     return a;
   32920             :                 } else if ((b.imag == 0) && (a.real >= 0)) {
   32921             :                     z.real = powl(a.real, b.real);
   32922             :                     z.imag = 0;
   32923             :                     return z;
   32924             :                 } else if (a.real > 0) {
   32925             :                     r = a.real;
   32926             :                     theta = 0;
   32927             :                 } else {
   32928             :                     r = -a.real;
   32929             :                     theta = atan2l(0.0, -1.0);
   32930             :                 }
   32931             :             } else {
   32932             :                 r = __Pyx_c_abs_long__double(a);
   32933             :                 theta = atan2l(a.imag, a.real);
   32934             :             }
   32935             :             lnr = logl(r);
   32936             :             z_r = expl(lnr * b.real - theta * b.imag);
   32937             :             z_theta = theta * b.real + lnr * b.imag;
   32938             :             z.real = z_r * cosl(z_theta);
   32939             :             z.imag = z_r * sinl(z_theta);
   32940             :             return z;
   32941             :         }
   32942             :     #endif
   32943             : #endif
   32944             : 
   32945             : /* MemviewSliceCopyTemplate */
   32946             :   static __Pyx_memviewslice
   32947           0 : __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
   32948             :                                  const char *mode, int ndim,
   32949             :                                  size_t sizeof_dtype, int contig_flag,
   32950             :                                  int dtype_is_object)
   32951             : {
   32952             :     __Pyx_RefNannyDeclarations
   32953           0 :     int i;
   32954           0 :     __Pyx_memviewslice new_mvs = { 0, 0, { 0 }, { 0 }, { 0 } };
   32955           0 :     struct __pyx_memoryview_obj *from_memview = from_mvs->memview;
   32956           0 :     Py_buffer *buf = &from_memview->view;
   32957           0 :     PyObject *shape_tuple = NULL;
   32958           0 :     PyObject *temp_int = NULL;
   32959           0 :     struct __pyx_array_obj *array_obj = NULL;
   32960           0 :     struct __pyx_memoryview_obj *memview_obj = NULL;
   32961           0 :     __Pyx_RefNannySetupContext("__pyx_memoryview_copy_new_contig", 0);
   32962           0 :     for (i = 0; i < ndim; i++) {
   32963           0 :         if (unlikely(from_mvs->suboffsets[i] >= 0)) {
   32964           0 :             PyErr_Format(PyExc_ValueError, "Cannot copy memoryview slice with "
   32965             :                                            "indirect dimensions (axis %d)", i);
   32966           0 :             goto fail;
   32967             :         }
   32968             :     }
   32969           0 :     shape_tuple = PyTuple_New(ndim);
   32970           0 :     if (unlikely(!shape_tuple)) {
   32971           0 :         goto fail;
   32972             :     }
   32973             :     __Pyx_GOTREF(shape_tuple);
   32974           0 :     for(i = 0; i < ndim; i++) {
   32975           0 :         temp_int = PyInt_FromSsize_t(from_mvs->shape[i]);
   32976           0 :         if(unlikely(!temp_int)) {
   32977           0 :             goto fail;
   32978             :         } else {
   32979           0 :             PyTuple_SET_ITEM(shape_tuple, i, temp_int);
   32980           0 :             temp_int = NULL;
   32981             :         }
   32982             :     }
   32983           0 :     array_obj = __pyx_array_new(shape_tuple, sizeof_dtype, buf->format, (char *) mode, NULL);
   32984           0 :     if (unlikely(!array_obj)) {
   32985           0 :         goto fail;
   32986             :     }
   32987           0 :     __Pyx_GOTREF(array_obj);
   32988           0 :     memview_obj = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
   32989             :                                     (PyObject *) array_obj, contig_flag,
   32990             :                                     dtype_is_object,
   32991           0 :                                     from_mvs->memview->typeinfo);
   32992           0 :     if (unlikely(!memview_obj))
   32993           0 :         goto fail;
   32994           0 :     if (unlikely(__Pyx_init_memviewslice(memview_obj, ndim, &new_mvs, 1) < 0))
   32995           0 :         goto fail;
   32996           0 :     if (unlikely(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim,
   32997             :                                                 dtype_is_object) < 0))
   32998           0 :         goto fail;
   32999           0 :     goto no_fail;
   33000           0 : fail:
   33001           0 :     __Pyx_XDECREF(new_mvs.memview);
   33002           0 :     new_mvs.memview = NULL;
   33003           0 :     new_mvs.data = NULL;
   33004           0 : no_fail:
   33005           0 :     __Pyx_XDECREF(shape_tuple);
   33006           0 :     __Pyx_XDECREF(temp_int);
   33007           0 :     __Pyx_XDECREF(array_obj);
   33008           0 :     __Pyx_RefNannyFinishContext();
   33009           0 :     return new_mvs;
   33010             : }
   33011             : 
   33012             : /* MemviewSliceInit */
   33013             :   static int
   33014         141 : __Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview,
   33015             :                         int ndim,
   33016             :                         __Pyx_memviewslice *memviewslice,
   33017             :                         int memview_is_new_reference)
   33018             : {
   33019             :     __Pyx_RefNannyDeclarations
   33020         141 :     int i, retval=-1;
   33021         141 :     Py_buffer *buf = &memview->view;
   33022         141 :     __Pyx_RefNannySetupContext("init_memviewslice", 0);
   33023         141 :     if (unlikely(memviewslice->memview || memviewslice->data)) {
   33024           0 :         PyErr_SetString(PyExc_ValueError,
   33025             :             "memviewslice is already initialized!");
   33026           0 :         goto fail;
   33027             :     }
   33028         141 :     if (buf->strides) {
   33029         282 :         for (i = 0; i < ndim; i++) {
   33030         141 :             memviewslice->strides[i] = buf->strides[i];
   33031             :         }
   33032             :     } else {
   33033           0 :         Py_ssize_t stride = buf->itemsize;
   33034           0 :         for (i = ndim - 1; i >= 0; i--) {
   33035           0 :             memviewslice->strides[i] = stride;
   33036           0 :             stride *= buf->shape[i];
   33037             :         }
   33038             :     }
   33039         282 :     for (i = 0; i < ndim; i++) {
   33040         141 :         memviewslice->shape[i]   = buf->shape[i];
   33041         141 :         if (buf->suboffsets) {
   33042           0 :             memviewslice->suboffsets[i] = buf->suboffsets[i];
   33043             :         } else {
   33044         141 :             memviewslice->suboffsets[i] = -1;
   33045             :         }
   33046             :     }
   33047         141 :     memviewslice->memview = memview;
   33048         141 :     memviewslice->data = (char *)buf->buf;
   33049         141 :     if (__pyx_add_acquisition_count(memview) == 0 && !memview_is_new_reference) {
   33050           0 :         Py_INCREF(memview);
   33051             :     }
   33052         141 :     retval = 0;
   33053         141 :     goto no_fail;
   33054           0 : fail:
   33055           0 :     memviewslice->memview = 0;
   33056           0 :     memviewslice->data = 0;
   33057           0 :     retval = -1;
   33058         141 : no_fail:
   33059         141 :     __Pyx_RefNannyFinishContext();
   33060         141 :     return retval;
   33061             : }
   33062             : #ifndef Py_NO_RETURN
   33063             : #define Py_NO_RETURN
   33064             : #endif
   33065           0 : static void __pyx_fatalerror(const char *fmt, ...) Py_NO_RETURN {
   33066           0 :     va_list vargs;
   33067           0 :     char msg[200];
   33068             : #if PY_VERSION_HEX >= 0x030A0000 || defined(HAVE_STDARG_PROTOTYPES)
   33069           0 :     va_start(vargs, fmt);
   33070             : #else
   33071             :     va_start(vargs);
   33072             : #endif
   33073           0 :     vsnprintf(msg, 200, fmt, vargs);
   33074           0 :     va_end(vargs);
   33075           0 :     Py_FatalError(msg);
   33076             : }
   33077             : static CYTHON_INLINE int
   33078             : __pyx_add_acquisition_count_locked(__pyx_atomic_int_type *acquisition_count,
   33079             :                                    PyThread_type_lock lock)
   33080             : {
   33081             :     int result;
   33082             :     PyThread_acquire_lock(lock, 1);
   33083             :     result = (*acquisition_count)++;
   33084             :     PyThread_release_lock(lock);
   33085             :     return result;
   33086             : }
   33087             : static CYTHON_INLINE int
   33088             : __pyx_sub_acquisition_count_locked(__pyx_atomic_int_type *acquisition_count,
   33089             :                                    PyThread_type_lock lock)
   33090             : {
   33091             :     int result;
   33092             :     PyThread_acquire_lock(lock, 1);
   33093             :     result = (*acquisition_count)--;
   33094             :     PyThread_release_lock(lock);
   33095             :     return result;
   33096             : }
   33097             : static CYTHON_INLINE void
   33098           0 : __Pyx_INC_MEMVIEW(__Pyx_memviewslice *memslice, int have_gil, int lineno)
   33099             : {
   33100           0 :     __pyx_nonatomic_int_type old_acquisition_count;
   33101           0 :     struct __pyx_memoryview_obj *memview = memslice->memview;
   33102           0 :     if (unlikely(!memview || (PyObject *) memview == Py_None)) {
   33103             :         return;
   33104             :     }
   33105           0 :     old_acquisition_count = __pyx_add_acquisition_count(memview);
   33106           0 :     if (unlikely(old_acquisition_count <= 0)) {
   33107           0 :         if (likely(old_acquisition_count == 0)) {
   33108           0 :             if (have_gil) {
   33109           0 :                 Py_INCREF((PyObject *) memview);
   33110             :             } else {
   33111           0 :                 PyGILState_STATE _gilstate = PyGILState_Ensure();
   33112           0 :                 Py_INCREF((PyObject *) memview);
   33113           0 :                 PyGILState_Release(_gilstate);
   33114             :             }
   33115             :         } else {
   33116           0 :             __pyx_fatalerror("Acquisition count is %d (line %d)",
   33117             :                              old_acquisition_count+1, lineno);
   33118             :         }
   33119             :     }
   33120             : }
   33121         141 : static CYTHON_INLINE void __Pyx_XCLEAR_MEMVIEW(__Pyx_memviewslice *memslice,
   33122             :                                              int have_gil, int lineno) {
   33123         141 :     __pyx_nonatomic_int_type old_acquisition_count;
   33124         141 :     struct __pyx_memoryview_obj *memview = memslice->memview;
   33125         141 :     if (unlikely(!memview || (PyObject *) memview == Py_None)) {
   33126           0 :         memslice->memview = NULL;
   33127           0 :         return;
   33128             :     }
   33129         141 :     old_acquisition_count = __pyx_sub_acquisition_count(memview);
   33130         141 :     memslice->data = NULL;
   33131         141 :     if (likely(old_acquisition_count > 1)) {
   33132           0 :         memslice->memview = NULL;
   33133         141 :     } else if (likely(old_acquisition_count == 1)) {
   33134         141 :         if (have_gil) {
   33135         141 :             Py_CLEAR(memslice->memview);
   33136             :         } else {
   33137           0 :             PyGILState_STATE _gilstate = PyGILState_Ensure();
   33138           0 :             Py_CLEAR(memslice->memview);
   33139           0 :             PyGILState_Release(_gilstate);
   33140             :         }
   33141             :     } else {
   33142           0 :         __pyx_fatalerror("Acquisition count is %d (line %d)",
   33143             :                          old_acquisition_count-1, lineno);
   33144             :     }
   33145             : }
   33146             : 
   33147             : /* CIntToPy */
   33148        5284 :   static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
   33149             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   33150             : #pragma GCC diagnostic push
   33151             : #pragma GCC diagnostic ignored "-Wconversion"
   33152             : #endif
   33153        5284 :     const int neg_one = (int) -1, const_zero = (int) 0;
   33154             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   33155             : #pragma GCC diagnostic pop
   33156             : #endif
   33157        5284 :     const int is_unsigned = neg_one > const_zero;
   33158        5284 :     if (is_unsigned) {
   33159             :         if (sizeof(int) < sizeof(long)) {
   33160             :             return PyInt_FromLong((long) value);
   33161             :         } else if (sizeof(int) <= sizeof(unsigned long)) {
   33162             :             return PyLong_FromUnsignedLong((unsigned long) value);
   33163             : #ifdef HAVE_LONG_LONG
   33164             :         } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
   33165             :             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
   33166             : #endif
   33167             :         }
   33168             :     } else {
   33169        5284 :         if (sizeof(int) <= sizeof(long)) {
   33170        5284 :             return PyInt_FromLong((long) value);
   33171             : #ifdef HAVE_LONG_LONG
   33172             :         } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
   33173             :             return PyLong_FromLongLong((PY_LONG_LONG) value);
   33174             : #endif
   33175             :         }
   33176             :     }
   33177             :     {
   33178             :         unsigned char *bytes = (unsigned char *)&value;
   33179             : #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
   33180             :         if (is_unsigned) {
   33181             :             return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
   33182             :         } else {
   33183             :             return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
   33184             :         }
   33185             : #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
   33186             :         int one = 1; int little = (int)*(unsigned char *)&one;
   33187             :         return _PyLong_FromByteArray(bytes, sizeof(int),
   33188             :                                      little, !is_unsigned);
   33189             : #else
   33190             :         int one = 1; int little = (int)*(unsigned char *)&one;
   33191             :         PyObject *from_bytes, *result = NULL;
   33192             :         PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
   33193             :         from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
   33194             :         if (!from_bytes) return NULL;
   33195             :         py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int));
   33196             :         if (!py_bytes) goto limited_bad;
   33197             :         order_str = PyUnicode_FromString(little ? "little" : "big");
   33198             :         if (!order_str) goto limited_bad;
   33199             :         arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
   33200             :         if (!arg_tuple) goto limited_bad;
   33201             :         if (!is_unsigned) {
   33202             :             kwds = PyDict_New();
   33203             :             if (!kwds) goto limited_bad;
   33204             :             if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
   33205             :         }
   33206             :         result = PyObject_Call(from_bytes, arg_tuple, kwds);
   33207             :         limited_bad:
   33208             :         Py_XDECREF(kwds);
   33209             :         Py_XDECREF(arg_tuple);
   33210             :         Py_XDECREF(order_str);
   33211             :         Py_XDECREF(py_bytes);
   33212             :         Py_XDECREF(from_bytes);
   33213             :         return result;
   33214             : #endif
   33215             :     }
   33216             : }
   33217             : 
   33218             : /* CIntFromPy */
   33219         141 :   static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
   33220             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   33221             : #pragma GCC diagnostic push
   33222             : #pragma GCC diagnostic ignored "-Wconversion"
   33223             : #endif
   33224         141 :     const int neg_one = (int) -1, const_zero = (int) 0;
   33225             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   33226             : #pragma GCC diagnostic pop
   33227             : #endif
   33228         141 :     const int is_unsigned = neg_one > const_zero;
   33229             : #if PY_MAJOR_VERSION < 3
   33230             :     if (likely(PyInt_Check(x))) {
   33231             :         if ((sizeof(int) < sizeof(long))) {
   33232             :             __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
   33233             :         } else {
   33234             :             long val = PyInt_AS_LONG(x);
   33235             :             if (is_unsigned && unlikely(val < 0)) {
   33236             :                 goto raise_neg_overflow;
   33237             :             }
   33238             :             return (int) val;
   33239             :         }
   33240             :     }
   33241             : #endif
   33242         141 :     if (unlikely(!PyLong_Check(x))) {
   33243           0 :         int val;
   33244           0 :         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
   33245           0 :         if (!tmp) return (int) -1;
   33246           0 :         val = __Pyx_PyInt_As_int(tmp);
   33247           0 :         Py_DECREF(tmp);
   33248           0 :         return val;
   33249             :     }
   33250         141 :     if (is_unsigned) {
   33251             : #if CYTHON_USE_PYLONG_INTERNALS
   33252             :         if (unlikely(__Pyx_PyLong_IsNeg(x))) {
   33253             :             goto raise_neg_overflow;
   33254             :         } else if (__Pyx_PyLong_IsCompact(x)) {
   33255             :             __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
   33256             :         } else {
   33257             :             const digit* digits = __Pyx_PyLong_Digits(x);
   33258             :             assert(__Pyx_PyLong_DigitCount(x) > 1);
   33259             :             switch (__Pyx_PyLong_DigitCount(x)) {
   33260             :                 case 2:
   33261             :                     if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
   33262             :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   33263             :                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33264             :                         } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) {
   33265             :                             return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
   33266             :                         }
   33267             :                     }
   33268             :                     break;
   33269             :                 case 3:
   33270             :                     if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
   33271             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   33272             :                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33273             :                         } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) {
   33274             :                             return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
   33275             :                         }
   33276             :                     }
   33277             :                     break;
   33278             :                 case 4:
   33279             :                     if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
   33280             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   33281             :                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33282             :                         } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) {
   33283             :                             return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
   33284             :                         }
   33285             :                     }
   33286             :                     break;
   33287             :             }
   33288             :         }
   33289             : #endif
   33290             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
   33291             :         if (unlikely(Py_SIZE(x) < 0)) {
   33292             :             goto raise_neg_overflow;
   33293             :         }
   33294             : #else
   33295             :         {
   33296             :             int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
   33297             :             if (unlikely(result < 0))
   33298             :                 return (int) -1;
   33299             :             if (unlikely(result == 1))
   33300             :                 goto raise_neg_overflow;
   33301             :         }
   33302             : #endif
   33303             :         if ((sizeof(int) <= sizeof(unsigned long))) {
   33304             :             __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
   33305             : #ifdef HAVE_LONG_LONG
   33306             :         } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
   33307             :             __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
   33308             : #endif
   33309             :         }
   33310             :     } else {
   33311             : #if CYTHON_USE_PYLONG_INTERNALS
   33312         141 :         if (__Pyx_PyLong_IsCompact(x)) {
   33313         141 :             __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
   33314             :         } else {
   33315           0 :             const digit* digits = __Pyx_PyLong_Digits(x);
   33316           0 :             assert(__Pyx_PyLong_DigitCount(x) > 1);
   33317           0 :             switch (__Pyx_PyLong_SignedDigitCount(x)) {
   33318             :                 case -2:
   33319           0 :                     if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) {
   33320           0 :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   33321           0 :                             __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33322             :                         } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
   33323             :                             return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
   33324             :                         }
   33325             :                     }
   33326             :                     break;
   33327             :                 case 2:
   33328           0 :                     if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
   33329           0 :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   33330           0 :                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33331             :                         } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
   33332             :                             return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
   33333             :                         }
   33334             :                     }
   33335             :                     break;
   33336             :                 case -3:
   33337             :                     if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
   33338             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   33339             :                             __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33340             :                         } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
   33341             :                             return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
   33342             :                         }
   33343             :                     }
   33344             :                     break;
   33345             :                 case 3:
   33346             :                     if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
   33347             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   33348             :                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33349             :                         } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
   33350             :                             return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
   33351             :                         }
   33352             :                     }
   33353             :                     break;
   33354             :                 case -4:
   33355             :                     if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
   33356             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   33357             :                             __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33358             :                         } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
   33359             :                             return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
   33360             :                         }
   33361             :                     }
   33362             :                     break;
   33363             :                 case 4:
   33364             :                     if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
   33365             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   33366             :                             __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33367             :                         } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
   33368             :                             return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
   33369             :                         }
   33370             :                     }
   33371             :                     break;
   33372             :             }
   33373             :         }
   33374             : #endif
   33375           0 :         if ((sizeof(int) <= sizeof(long))) {
   33376           0 :             __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
   33377             : #ifdef HAVE_LONG_LONG
   33378             :         } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
   33379             :             __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
   33380             : #endif
   33381             :         }
   33382             :     }
   33383             :     {
   33384             :         int val;
   33385             :         int ret = -1;
   33386             : #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
   33387             :         Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
   33388             :             x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
   33389             :         if (unlikely(bytes_copied == -1)) {
   33390             :         } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
   33391             :             goto raise_overflow;
   33392             :         } else {
   33393             :             ret = 0;
   33394             :         }
   33395             : #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
   33396             :         int one = 1; int is_little = (int)*(unsigned char *)&one;
   33397             :         unsigned char *bytes = (unsigned char *)&val;
   33398             :         ret = _PyLong_AsByteArray((PyLongObject *)x,
   33399             :                                     bytes, sizeof(val),
   33400             :                                     is_little, !is_unsigned);
   33401             : #else
   33402             :         PyObject *v;
   33403             :         PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
   33404             :         int bits, remaining_bits, is_negative = 0;
   33405             :         int chunk_size = (sizeof(long) < 8) ? 30 : 62;
   33406             :         if (likely(PyLong_CheckExact(x))) {
   33407             :             v = __Pyx_NewRef(x);
   33408             :         } else {
   33409             :             v = PyNumber_Long(x);
   33410             :             if (unlikely(!v)) return (int) -1;
   33411             :             assert(PyLong_CheckExact(v));
   33412             :         }
   33413             :         {
   33414             :             int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
   33415             :             if (unlikely(result < 0)) {
   33416             :                 Py_DECREF(v);
   33417             :                 return (int) -1;
   33418             :             }
   33419             :             is_negative = result == 1;
   33420             :         }
   33421             :         if (is_unsigned && unlikely(is_negative)) {
   33422             :             Py_DECREF(v);
   33423             :             goto raise_neg_overflow;
   33424             :         } else if (is_negative) {
   33425             :             stepval = PyNumber_Invert(v);
   33426             :             Py_DECREF(v);
   33427             :             if (unlikely(!stepval))
   33428             :                 return (int) -1;
   33429             :         } else {
   33430             :             stepval = v;
   33431             :         }
   33432             :         v = NULL;
   33433             :         val = (int) 0;
   33434             :         mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
   33435             :         shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
   33436             :         for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) {
   33437             :             PyObject *tmp, *digit;
   33438             :             long idigit;
   33439             :             digit = PyNumber_And(stepval, mask);
   33440             :             if (unlikely(!digit)) goto done;
   33441             :             idigit = PyLong_AsLong(digit);
   33442             :             Py_DECREF(digit);
   33443             :             if (unlikely(idigit < 0)) goto done;
   33444             :             val |= ((int) idigit) << bits;
   33445             :             tmp = PyNumber_Rshift(stepval, shift);
   33446             :             if (unlikely(!tmp)) goto done;
   33447             :             Py_DECREF(stepval); stepval = tmp;
   33448             :         }
   33449             :         Py_DECREF(shift); shift = NULL;
   33450             :         Py_DECREF(mask); mask = NULL;
   33451             :         {
   33452             :             long idigit = PyLong_AsLong(stepval);
   33453             :             if (unlikely(idigit < 0)) goto done;
   33454             :             remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1);
   33455             :             if (unlikely(idigit >= (1L << remaining_bits)))
   33456             :                 goto raise_overflow;
   33457             :             val |= ((int) idigit) << bits;
   33458             :         }
   33459             :         if (!is_unsigned) {
   33460             :             if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1))))
   33461             :                 goto raise_overflow;
   33462             :             if (is_negative)
   33463             :                 val = ~val;
   33464             :         }
   33465             :         ret = 0;
   33466             :     done:
   33467             :         Py_XDECREF(shift);
   33468             :         Py_XDECREF(mask);
   33469             :         Py_XDECREF(stepval);
   33470             : #endif
   33471             :         if (unlikely(ret))
   33472             :             return (int) -1;
   33473             :         return val;
   33474             :     }
   33475           0 : raise_overflow:
   33476           0 :     PyErr_SetString(PyExc_OverflowError,
   33477             :         "value too large to convert to int");
   33478           0 :     return (int) -1;
   33479             : raise_neg_overflow:
   33480             :     PyErr_SetString(PyExc_OverflowError,
   33481             :         "can't convert negative value to int");
   33482             :     return (int) -1;
   33483             : }
   33484             : 
   33485             : /* CIntToPy */
   33486         174 :   static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
   33487             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   33488             : #pragma GCC diagnostic push
   33489             : #pragma GCC diagnostic ignored "-Wconversion"
   33490             : #endif
   33491         174 :     const long neg_one = (long) -1, const_zero = (long) 0;
   33492             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   33493             : #pragma GCC diagnostic pop
   33494             : #endif
   33495         174 :     const int is_unsigned = neg_one > const_zero;
   33496         174 :     if (is_unsigned) {
   33497             :         if (sizeof(long) < sizeof(long)) {
   33498             :             return PyInt_FromLong((long) value);
   33499             :         } else if (sizeof(long) <= sizeof(unsigned long)) {
   33500             :             return PyLong_FromUnsignedLong((unsigned long) value);
   33501             : #ifdef HAVE_LONG_LONG
   33502             :         } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
   33503             :             return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
   33504             : #endif
   33505             :         }
   33506             :     } else {
   33507         174 :         if (sizeof(long) <= sizeof(long)) {
   33508         174 :             return PyInt_FromLong((long) value);
   33509             : #ifdef HAVE_LONG_LONG
   33510             :         } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
   33511             :             return PyLong_FromLongLong((PY_LONG_LONG) value);
   33512             : #endif
   33513             :         }
   33514             :     }
   33515             :     {
   33516             :         unsigned char *bytes = (unsigned char *)&value;
   33517             : #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
   33518             :         if (is_unsigned) {
   33519             :             return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
   33520             :         } else {
   33521             :             return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
   33522             :         }
   33523             : #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
   33524             :         int one = 1; int little = (int)*(unsigned char *)&one;
   33525             :         return _PyLong_FromByteArray(bytes, sizeof(long),
   33526             :                                      little, !is_unsigned);
   33527             : #else
   33528             :         int one = 1; int little = (int)*(unsigned char *)&one;
   33529             :         PyObject *from_bytes, *result = NULL;
   33530             :         PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
   33531             :         from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
   33532             :         if (!from_bytes) return NULL;
   33533             :         py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long));
   33534             :         if (!py_bytes) goto limited_bad;
   33535             :         order_str = PyUnicode_FromString(little ? "little" : "big");
   33536             :         if (!order_str) goto limited_bad;
   33537             :         arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
   33538             :         if (!arg_tuple) goto limited_bad;
   33539             :         if (!is_unsigned) {
   33540             :             kwds = PyDict_New();
   33541             :             if (!kwds) goto limited_bad;
   33542             :             if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
   33543             :         }
   33544             :         result = PyObject_Call(from_bytes, arg_tuple, kwds);
   33545             :         limited_bad:
   33546             :         Py_XDECREF(kwds);
   33547             :         Py_XDECREF(arg_tuple);
   33548             :         Py_XDECREF(order_str);
   33549             :         Py_XDECREF(py_bytes);
   33550             :         Py_XDECREF(from_bytes);
   33551             :         return result;
   33552             : #endif
   33553             :     }
   33554             : }
   33555             : 
   33556             : /* CIntFromPy */
   33557           0 :   static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
   33558             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   33559             : #pragma GCC diagnostic push
   33560             : #pragma GCC diagnostic ignored "-Wconversion"
   33561             : #endif
   33562           0 :     const long neg_one = (long) -1, const_zero = (long) 0;
   33563             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   33564             : #pragma GCC diagnostic pop
   33565             : #endif
   33566           0 :     const int is_unsigned = neg_one > const_zero;
   33567             : #if PY_MAJOR_VERSION < 3
   33568             :     if (likely(PyInt_Check(x))) {
   33569             :         if ((sizeof(long) < sizeof(long))) {
   33570             :             __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
   33571             :         } else {
   33572             :             long val = PyInt_AS_LONG(x);
   33573             :             if (is_unsigned && unlikely(val < 0)) {
   33574             :                 goto raise_neg_overflow;
   33575             :             }
   33576             :             return (long) val;
   33577             :         }
   33578             :     }
   33579             : #endif
   33580           0 :     if (unlikely(!PyLong_Check(x))) {
   33581           0 :         long val;
   33582           0 :         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
   33583           0 :         if (!tmp) return (long) -1;
   33584           0 :         val = __Pyx_PyInt_As_long(tmp);
   33585           0 :         Py_DECREF(tmp);
   33586           0 :         return val;
   33587             :     }
   33588           0 :     if (is_unsigned) {
   33589             : #if CYTHON_USE_PYLONG_INTERNALS
   33590             :         if (unlikely(__Pyx_PyLong_IsNeg(x))) {
   33591             :             goto raise_neg_overflow;
   33592             :         } else if (__Pyx_PyLong_IsCompact(x)) {
   33593             :             __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
   33594             :         } else {
   33595             :             const digit* digits = __Pyx_PyLong_Digits(x);
   33596             :             assert(__Pyx_PyLong_DigitCount(x) > 1);
   33597             :             switch (__Pyx_PyLong_DigitCount(x)) {
   33598             :                 case 2:
   33599             :                     if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
   33600             :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   33601             :                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33602             :                         } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) {
   33603             :                             return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
   33604             :                         }
   33605             :                     }
   33606             :                     break;
   33607             :                 case 3:
   33608             :                     if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
   33609             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   33610             :                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33611             :                         } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) {
   33612             :                             return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
   33613             :                         }
   33614             :                     }
   33615             :                     break;
   33616             :                 case 4:
   33617             :                     if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
   33618             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   33619             :                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33620             :                         } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) {
   33621             :                             return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
   33622             :                         }
   33623             :                     }
   33624             :                     break;
   33625             :             }
   33626             :         }
   33627             : #endif
   33628             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
   33629             :         if (unlikely(Py_SIZE(x) < 0)) {
   33630             :             goto raise_neg_overflow;
   33631             :         }
   33632             : #else
   33633             :         {
   33634             :             int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
   33635             :             if (unlikely(result < 0))
   33636             :                 return (long) -1;
   33637             :             if (unlikely(result == 1))
   33638             :                 goto raise_neg_overflow;
   33639             :         }
   33640             : #endif
   33641             :         if ((sizeof(long) <= sizeof(unsigned long))) {
   33642             :             __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
   33643             : #ifdef HAVE_LONG_LONG
   33644             :         } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
   33645             :             __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
   33646             : #endif
   33647             :         }
   33648             :     } else {
   33649             : #if CYTHON_USE_PYLONG_INTERNALS
   33650           0 :         if (__Pyx_PyLong_IsCompact(x)) {
   33651           0 :             __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
   33652             :         } else {
   33653           0 :             const digit* digits = __Pyx_PyLong_Digits(x);
   33654           0 :             assert(__Pyx_PyLong_DigitCount(x) > 1);
   33655           0 :             switch (__Pyx_PyLong_SignedDigitCount(x)) {
   33656             :                 case -2:
   33657           0 :                     if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) {
   33658           0 :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   33659           0 :                             __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33660             :                         } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
   33661             :                             return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
   33662             :                         }
   33663             :                     }
   33664             :                     break;
   33665             :                 case 2:
   33666           0 :                     if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
   33667           0 :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   33668           0 :                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33669             :                         } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
   33670             :                             return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
   33671             :                         }
   33672             :                     }
   33673             :                     break;
   33674             :                 case -3:
   33675             :                     if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
   33676             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   33677             :                             __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33678             :                         } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
   33679             :                             return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
   33680             :                         }
   33681             :                     }
   33682             :                     break;
   33683             :                 case 3:
   33684             :                     if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
   33685             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   33686             :                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33687             :                         } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
   33688             :                             return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
   33689             :                         }
   33690             :                     }
   33691             :                     break;
   33692             :                 case -4:
   33693             :                     if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
   33694             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   33695             :                             __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33696             :                         } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
   33697             :                             return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
   33698             :                         }
   33699             :                     }
   33700             :                     break;
   33701             :                 case 4:
   33702             :                     if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
   33703             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   33704             :                             __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33705             :                         } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
   33706             :                             return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
   33707             :                         }
   33708             :                     }
   33709             :                     break;
   33710             :             }
   33711             :         }
   33712             : #endif
   33713           0 :         if ((sizeof(long) <= sizeof(long))) {
   33714           0 :             __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
   33715             : #ifdef HAVE_LONG_LONG
   33716             :         } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
   33717             :             __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
   33718             : #endif
   33719             :         }
   33720             :     }
   33721             :     {
   33722             :         long val;
   33723             :         int ret = -1;
   33724             : #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
   33725             :         Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
   33726             :             x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
   33727             :         if (unlikely(bytes_copied == -1)) {
   33728             :         } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
   33729             :             goto raise_overflow;
   33730             :         } else {
   33731             :             ret = 0;
   33732             :         }
   33733             : #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
   33734             :         int one = 1; int is_little = (int)*(unsigned char *)&one;
   33735             :         unsigned char *bytes = (unsigned char *)&val;
   33736             :         ret = _PyLong_AsByteArray((PyLongObject *)x,
   33737             :                                     bytes, sizeof(val),
   33738             :                                     is_little, !is_unsigned);
   33739             : #else
   33740             :         PyObject *v;
   33741             :         PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
   33742             :         int bits, remaining_bits, is_negative = 0;
   33743             :         int chunk_size = (sizeof(long) < 8) ? 30 : 62;
   33744             :         if (likely(PyLong_CheckExact(x))) {
   33745             :             v = __Pyx_NewRef(x);
   33746             :         } else {
   33747             :             v = PyNumber_Long(x);
   33748             :             if (unlikely(!v)) return (long) -1;
   33749             :             assert(PyLong_CheckExact(v));
   33750             :         }
   33751             :         {
   33752             :             int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
   33753             :             if (unlikely(result < 0)) {
   33754             :                 Py_DECREF(v);
   33755             :                 return (long) -1;
   33756             :             }
   33757             :             is_negative = result == 1;
   33758             :         }
   33759             :         if (is_unsigned && unlikely(is_negative)) {
   33760             :             Py_DECREF(v);
   33761             :             goto raise_neg_overflow;
   33762             :         } else if (is_negative) {
   33763             :             stepval = PyNumber_Invert(v);
   33764             :             Py_DECREF(v);
   33765             :             if (unlikely(!stepval))
   33766             :                 return (long) -1;
   33767             :         } else {
   33768             :             stepval = v;
   33769             :         }
   33770             :         v = NULL;
   33771             :         val = (long) 0;
   33772             :         mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
   33773             :         shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
   33774             :         for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) {
   33775             :             PyObject *tmp, *digit;
   33776             :             long idigit;
   33777             :             digit = PyNumber_And(stepval, mask);
   33778             :             if (unlikely(!digit)) goto done;
   33779             :             idigit = PyLong_AsLong(digit);
   33780             :             Py_DECREF(digit);
   33781             :             if (unlikely(idigit < 0)) goto done;
   33782             :             val |= ((long) idigit) << bits;
   33783             :             tmp = PyNumber_Rshift(stepval, shift);
   33784             :             if (unlikely(!tmp)) goto done;
   33785             :             Py_DECREF(stepval); stepval = tmp;
   33786             :         }
   33787             :         Py_DECREF(shift); shift = NULL;
   33788             :         Py_DECREF(mask); mask = NULL;
   33789             :         {
   33790             :             long idigit = PyLong_AsLong(stepval);
   33791             :             if (unlikely(idigit < 0)) goto done;
   33792             :             remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1);
   33793             :             if (unlikely(idigit >= (1L << remaining_bits)))
   33794             :                 goto raise_overflow;
   33795             :             val |= ((long) idigit) << bits;
   33796             :         }
   33797             :         if (!is_unsigned) {
   33798             :             if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1))))
   33799             :                 goto raise_overflow;
   33800             :             if (is_negative)
   33801             :                 val = ~val;
   33802             :         }
   33803             :         ret = 0;
   33804             :     done:
   33805             :         Py_XDECREF(shift);
   33806             :         Py_XDECREF(mask);
   33807             :         Py_XDECREF(stepval);
   33808             : #endif
   33809             :         if (unlikely(ret))
   33810             :             return (long) -1;
   33811             :         return val;
   33812             :     }
   33813             : raise_overflow:
   33814             :     PyErr_SetString(PyExc_OverflowError,
   33815             :         "value too large to convert to long");
   33816             :     return (long) -1;
   33817             : raise_neg_overflow:
   33818             :     PyErr_SetString(PyExc_OverflowError,
   33819             :         "can't convert negative value to long");
   33820             :     return (long) -1;
   33821             : }
   33822             : 
   33823             : /* CIntFromPy */
   33824             :   static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) {
   33825             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   33826             : #pragma GCC diagnostic push
   33827             : #pragma GCC diagnostic ignored "-Wconversion"
   33828             : #endif
   33829             :     const char neg_one = (char) -1, const_zero = (char) 0;
   33830             : #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
   33831             : #pragma GCC diagnostic pop
   33832             : #endif
   33833             :     const int is_unsigned = neg_one > const_zero;
   33834             : #if PY_MAJOR_VERSION < 3
   33835             :     if (likely(PyInt_Check(x))) {
   33836             :         if ((sizeof(char) < sizeof(long))) {
   33837             :             __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x))
   33838             :         } else {
   33839             :             long val = PyInt_AS_LONG(x);
   33840             :             if (is_unsigned && unlikely(val < 0)) {
   33841             :                 goto raise_neg_overflow;
   33842             :             }
   33843             :             return (char) val;
   33844             :         }
   33845             :     }
   33846             : #endif
   33847             :     if (unlikely(!PyLong_Check(x))) {
   33848             :         char val;
   33849             :         PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
   33850             :         if (!tmp) return (char) -1;
   33851             :         val = __Pyx_PyInt_As_char(tmp);
   33852             :         Py_DECREF(tmp);
   33853             :         return val;
   33854             :     }
   33855             :     if (is_unsigned) {
   33856             : #if CYTHON_USE_PYLONG_INTERNALS
   33857             :         if (unlikely(__Pyx_PyLong_IsNeg(x))) {
   33858             :             goto raise_neg_overflow;
   33859             :         } else if (__Pyx_PyLong_IsCompact(x)) {
   33860             :             __PYX_VERIFY_RETURN_INT(char, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
   33861             :         } else {
   33862             :             const digit* digits = __Pyx_PyLong_Digits(x);
   33863             :             assert(__Pyx_PyLong_DigitCount(x) > 1);
   33864             :             switch (__Pyx_PyLong_DigitCount(x)) {
   33865             :                 case 2:
   33866             :                     if ((8 * sizeof(char) > 1 * PyLong_SHIFT)) {
   33867             :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   33868             :                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33869             :                         } else if ((8 * sizeof(char) >= 2 * PyLong_SHIFT)) {
   33870             :                             return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
   33871             :                         }
   33872             :                     }
   33873             :                     break;
   33874             :                 case 3:
   33875             :                     if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) {
   33876             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   33877             :                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33878             :                         } else if ((8 * sizeof(char) >= 3 * PyLong_SHIFT)) {
   33879             :                             return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
   33880             :                         }
   33881             :                     }
   33882             :                     break;
   33883             :                 case 4:
   33884             :                     if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) {
   33885             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   33886             :                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33887             :                         } else if ((8 * sizeof(char) >= 4 * PyLong_SHIFT)) {
   33888             :                             return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
   33889             :                         }
   33890             :                     }
   33891             :                     break;
   33892             :             }
   33893             :         }
   33894             : #endif
   33895             : #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
   33896             :         if (unlikely(Py_SIZE(x) < 0)) {
   33897             :             goto raise_neg_overflow;
   33898             :         }
   33899             : #else
   33900             :         {
   33901             :             int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
   33902             :             if (unlikely(result < 0))
   33903             :                 return (char) -1;
   33904             :             if (unlikely(result == 1))
   33905             :                 goto raise_neg_overflow;
   33906             :         }
   33907             : #endif
   33908             :         if ((sizeof(char) <= sizeof(unsigned long))) {
   33909             :             __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x))
   33910             : #ifdef HAVE_LONG_LONG
   33911             :         } else if ((sizeof(char) <= sizeof(unsigned PY_LONG_LONG))) {
   33912             :             __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
   33913             : #endif
   33914             :         }
   33915             :     } else {
   33916             : #if CYTHON_USE_PYLONG_INTERNALS
   33917             :         if (__Pyx_PyLong_IsCompact(x)) {
   33918             :             __PYX_VERIFY_RETURN_INT(char, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
   33919             :         } else {
   33920             :             const digit* digits = __Pyx_PyLong_Digits(x);
   33921             :             assert(__Pyx_PyLong_DigitCount(x) > 1);
   33922             :             switch (__Pyx_PyLong_SignedDigitCount(x)) {
   33923             :                 case -2:
   33924             :                     if ((8 * sizeof(char) - 1 > 1 * PyLong_SHIFT)) {
   33925             :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   33926             :                             __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33927             :                         } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) {
   33928             :                             return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
   33929             :                         }
   33930             :                     }
   33931             :                     break;
   33932             :                 case 2:
   33933             :                     if ((8 * sizeof(char) > 1 * PyLong_SHIFT)) {
   33934             :                         if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
   33935             :                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33936             :                         } else if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) {
   33937             :                             return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
   33938             :                         }
   33939             :                     }
   33940             :                     break;
   33941             :                 case -3:
   33942             :                     if ((8 * sizeof(char) - 1 > 2 * PyLong_SHIFT)) {
   33943             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   33944             :                             __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33945             :                         } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) {
   33946             :                             return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
   33947             :                         }
   33948             :                     }
   33949             :                     break;
   33950             :                 case 3:
   33951             :                     if ((8 * sizeof(char) > 2 * PyLong_SHIFT)) {
   33952             :                         if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
   33953             :                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33954             :                         } else if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) {
   33955             :                             return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
   33956             :                         }
   33957             :                     }
   33958             :                     break;
   33959             :                 case -4:
   33960             :                     if ((8 * sizeof(char) - 1 > 3 * PyLong_SHIFT)) {
   33961             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   33962             :                             __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33963             :                         } else if ((8 * sizeof(char) - 1 > 4 * PyLong_SHIFT)) {
   33964             :                             return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
   33965             :                         }
   33966             :                     }
   33967             :                     break;
   33968             :                 case 4:
   33969             :                     if ((8 * sizeof(char) > 3 * PyLong_SHIFT)) {
   33970             :                         if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
   33971             :                             __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
   33972             :                         } else if ((8 * sizeof(char) - 1 > 4 * PyLong_SHIFT)) {
   33973             :                             return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
   33974             :                         }
   33975             :                     }
   33976             :                     break;
   33977             :             }
   33978             :         }
   33979             : #endif
   33980             :         if ((sizeof(char) <= sizeof(long))) {
   33981             :             __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x))
   33982             : #ifdef HAVE_LONG_LONG
   33983             :         } else if ((sizeof(char) <= sizeof(PY_LONG_LONG))) {
   33984             :             __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x))
   33985             : #endif
   33986             :         }
   33987             :     }
   33988             :     {
   33989             :         char val;
   33990             :         int ret = -1;
   33991             : #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
   33992             :         Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
   33993             :             x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
   33994             :         if (unlikely(bytes_copied == -1)) {
   33995             :         } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
   33996             :             goto raise_overflow;
   33997             :         } else {
   33998             :             ret = 0;
   33999             :         }
   34000             : #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
   34001             :         int one = 1; int is_little = (int)*(unsigned char *)&one;
   34002             :         unsigned char *bytes = (unsigned char *)&val;
   34003             :         ret = _PyLong_AsByteArray((PyLongObject *)x,
   34004             :                                     bytes, sizeof(val),
   34005             :                                     is_little, !is_unsigned);
   34006             : #else
   34007             :         PyObject *v;
   34008             :         PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
   34009             :         int bits, remaining_bits, is_negative = 0;
   34010             :         int chunk_size = (sizeof(long) < 8) ? 30 : 62;
   34011             :         if (likely(PyLong_CheckExact(x))) {
   34012             :             v = __Pyx_NewRef(x);
   34013             :         } else {
   34014             :             v = PyNumber_Long(x);
   34015             :             if (unlikely(!v)) return (char) -1;
   34016             :             assert(PyLong_CheckExact(v));
   34017             :         }
   34018             :         {
   34019             :             int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
   34020             :             if (unlikely(result < 0)) {
   34021             :                 Py_DECREF(v);
   34022             :                 return (char) -1;
   34023             :             }
   34024             :             is_negative = result == 1;
   34025             :         }
   34026             :         if (is_unsigned && unlikely(is_negative)) {
   34027             :             Py_DECREF(v);
   34028             :             goto raise_neg_overflow;
   34029             :         } else if (is_negative) {
   34030             :             stepval = PyNumber_Invert(v);
   34031             :             Py_DECREF(v);
   34032             :             if (unlikely(!stepval))
   34033             :                 return (char) -1;
   34034             :         } else {
   34035             :             stepval = v;
   34036             :         }
   34037             :         v = NULL;
   34038             :         val = (char) 0;
   34039             :         mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
   34040             :         shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
   34041             :         for (bits = 0; bits < (int) sizeof(char) * 8 - chunk_size; bits += chunk_size) {
   34042             :             PyObject *tmp, *digit;
   34043             :             long idigit;
   34044             :             digit = PyNumber_And(stepval, mask);
   34045             :             if (unlikely(!digit)) goto done;
   34046             :             idigit = PyLong_AsLong(digit);
   34047             :             Py_DECREF(digit);
   34048             :             if (unlikely(idigit < 0)) goto done;
   34049             :             val |= ((char) idigit) << bits;
   34050             :             tmp = PyNumber_Rshift(stepval, shift);
   34051             :             if (unlikely(!tmp)) goto done;
   34052             :             Py_DECREF(stepval); stepval = tmp;
   34053             :         }
   34054             :         Py_DECREF(shift); shift = NULL;
   34055             :         Py_DECREF(mask); mask = NULL;
   34056             :         {
   34057             :             long idigit = PyLong_AsLong(stepval);
   34058             :             if (unlikely(idigit < 0)) goto done;
   34059             :             remaining_bits = ((int) sizeof(char) * 8) - bits - (is_unsigned ? 0 : 1);
   34060             :             if (unlikely(idigit >= (1L << remaining_bits)))
   34061             :                 goto raise_overflow;
   34062             :             val |= ((char) idigit) << bits;
   34063             :         }
   34064             :         if (!is_unsigned) {
   34065             :             if (unlikely(val & (((char) 1) << (sizeof(char) * 8 - 1))))
   34066             :                 goto raise_overflow;
   34067             :             if (is_negative)
   34068             :                 val = ~val;
   34069             :         }
   34070             :         ret = 0;
   34071             :     done:
   34072             :         Py_XDECREF(shift);
   34073             :         Py_XDECREF(mask);
   34074             :         Py_XDECREF(stepval);
   34075             : #endif
   34076             :         if (unlikely(ret))
   34077             :             return (char) -1;
   34078             :         return val;
   34079             :     }
   34080             : raise_overflow:
   34081             :     PyErr_SetString(PyExc_OverflowError,
   34082             :         "value too large to convert to char");
   34083             :     return (char) -1;
   34084             : raise_neg_overflow:
   34085             :     PyErr_SetString(PyExc_OverflowError,
   34086             :         "can't convert negative value to char");
   34087             :     return (char) -1;
   34088             : }
   34089             : 
   34090             : /* FormatTypeName */
   34091             :   #if CYTHON_COMPILING_IN_LIMITED_API
   34092             : static __Pyx_TypeName
   34093             : __Pyx_PyType_GetName(PyTypeObject* tp)
   34094             : {
   34095             :     PyObject *name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
   34096             :                                                __pyx_n_s_name_2);
   34097             :     if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) {
   34098             :         PyErr_Clear();
   34099             :         Py_XDECREF(name);
   34100             :         name = __Pyx_NewRef(__pyx_n_s__74);
   34101             :     }
   34102             :     return name;
   34103             : }
   34104             : #endif
   34105             : 
   34106             : /* CheckBinaryVersion */
   34107           1 :   static unsigned long __Pyx_get_runtime_version(void) {
   34108             : #if __PYX_LIMITED_VERSION_HEX >= 0x030B00A4
   34109           1 :     return Py_Version & ~0xFFUL;
   34110             : #else
   34111             :     const char* rt_version = Py_GetVersion();
   34112             :     unsigned long version = 0;
   34113             :     unsigned long factor = 0x01000000UL;
   34114             :     unsigned int digit = 0;
   34115             :     int i = 0;
   34116             :     while (factor) {
   34117             :         while ('0' <= rt_version[i] && rt_version[i] <= '9') {
   34118             :             digit = digit * 10 + (unsigned int) (rt_version[i] - '0');
   34119             :             ++i;
   34120             :         }
   34121             :         version += factor * digit;
   34122             :         if (rt_version[i] != '.')
   34123             :             break;
   34124             :         digit = 0;
   34125             :         factor >>= 8;
   34126             :         ++i;
   34127             :     }
   34128             :     return version;
   34129             : #endif
   34130             : }
   34131           1 : static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) {
   34132           1 :     const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
   34133           1 :     if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
   34134             :         return 0;
   34135           0 :     if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
   34136             :         return 1;
   34137             :     {
   34138           0 :         char message[200];
   34139           0 :         PyOS_snprintf(message, sizeof(message),
   34140             :                       "compile time Python version %d.%d "
   34141             :                       "of module '%.100s' "
   34142             :                       "%s "
   34143             :                       "runtime version %d.%d",
   34144           0 :                        (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF),
   34145             :                        __Pyx_MODULE_NAME,
   34146             :                        (allow_newer) ? "was newer than" : "does not match",
   34147           0 :                        (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF)
   34148             :        );
   34149           0 :         return PyErr_WarnEx(NULL, message, 1);
   34150             :     }
   34151             : }
   34152             : 
   34153             : /* FunctionImport */
   34154             :   #ifndef __PYX_HAVE_RT_ImportFunction_3_0_11
   34155             : #define __PYX_HAVE_RT_ImportFunction_3_0_11
   34156           8 : static int __Pyx_ImportFunction_3_0_11(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
   34157           8 :     PyObject *d = 0;
   34158           8 :     PyObject *cobj = 0;
   34159           8 :     union {
   34160             :         void (*fp)(void);
   34161             :         void *p;
   34162             :     } tmp;
   34163           8 :     d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
   34164           8 :     if (!d)
   34165           0 :         goto bad;
   34166           8 :     cobj = PyDict_GetItemString(d, funcname);
   34167           8 :     if (!cobj) {
   34168           0 :         PyErr_Format(PyExc_ImportError,
   34169             :             "%.200s does not export expected C function %.200s",
   34170             :                 PyModule_GetName(module), funcname);
   34171           0 :         goto bad;
   34172             :     }
   34173           8 :     if (!PyCapsule_IsValid(cobj, sig)) {
   34174           0 :         PyErr_Format(PyExc_TypeError,
   34175             :             "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
   34176             :              PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj));
   34177           0 :         goto bad;
   34178             :     }
   34179           8 :     tmp.p = PyCapsule_GetPointer(cobj, sig);
   34180           8 :     *f = tmp.fp;
   34181           8 :     if (!(*f))
   34182           0 :         goto bad;
   34183           8 :     Py_DECREF(d);
   34184             :     return 0;
   34185           0 : bad:
   34186           0 :     Py_XDECREF(d);
   34187           0 :     return -1;
   34188             : }
   34189             : #endif
   34190             : 
   34191             : /* InitStrings */
   34192             :   #if PY_MAJOR_VERSION >= 3
   34193         137 : static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str) {
   34194         137 :     if (t.is_unicode | t.is_str) {
   34195         136 :         if (t.intern) {
   34196          88 :             *str = PyUnicode_InternFromString(t.s);
   34197          48 :         } else if (t.encoding) {
   34198           0 :             *str = PyUnicode_Decode(t.s, t.n - 1, t.encoding, NULL);
   34199             :         } else {
   34200          48 :             *str = PyUnicode_FromStringAndSize(t.s, t.n - 1);
   34201             :         }
   34202             :     } else {
   34203           1 :         *str = PyBytes_FromStringAndSize(t.s, t.n - 1);
   34204             :     }
   34205         137 :     if (!*str)
   34206             :         return -1;
   34207         137 :     if (PyObject_Hash(*str) == -1)
   34208             :         return -1;
   34209             :     return 0;
   34210             : }
   34211             : #endif
   34212           1 : static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
   34213         138 :     while (t->p) {
   34214             :         #if PY_MAJOR_VERSION >= 3
   34215         137 :         __Pyx_InitString(*t, t->p);
   34216             :         #else
   34217             :         if (t->is_unicode) {
   34218             :             *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
   34219             :         } else if (t->intern) {
   34220             :             *t->p = PyString_InternFromString(t->s);
   34221             :         } else {
   34222             :             *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
   34223             :         }
   34224             :         if (!*t->p)
   34225             :             return -1;
   34226             :         if (PyObject_Hash(*t->p) == -1)
   34227             :             return -1;
   34228             :         #endif
   34229         137 :         ++t;
   34230             :     }
   34231           1 :     return 0;
   34232             : }
   34233             : 
   34234             : #include <string.h>
   34235           0 : static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) {
   34236           0 :     size_t len = strlen(s);
   34237           0 :     if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
   34238             :         PyErr_SetString(PyExc_OverflowError, "byte string is too long");
   34239             :         return -1;
   34240             :     }
   34241             :     return (Py_ssize_t) len;
   34242             : }
   34243             : static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
   34244             :     Py_ssize_t len = __Pyx_ssize_strlen(c_str);
   34245             :     if (unlikely(len < 0)) return NULL;
   34246             :     return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
   34247             : }
   34248             : static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) {
   34249             :     Py_ssize_t len = __Pyx_ssize_strlen(c_str);
   34250             :     if (unlikely(len < 0)) return NULL;
   34251             :     return PyByteArray_FromStringAndSize(c_str, len);
   34252             : }
   34253             : static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
   34254             :     Py_ssize_t ignore;
   34255             :     return __Pyx_PyObject_AsStringAndSize(o, &ignore);
   34256             : }
   34257             : #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
   34258             : #if !CYTHON_PEP393_ENABLED
   34259             : static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
   34260             :     char* defenc_c;
   34261             :     PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
   34262             :     if (!defenc) return NULL;
   34263             :     defenc_c = PyBytes_AS_STRING(defenc);
   34264             : #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
   34265             :     {
   34266             :         char* end = defenc_c + PyBytes_GET_SIZE(defenc);
   34267             :         char* c;
   34268             :         for (c = defenc_c; c < end; c++) {
   34269             :             if ((unsigned char) (*c) >= 128) {
   34270             :                 PyUnicode_AsASCIIString(o);
   34271             :                 return NULL;
   34272             :             }
   34273             :         }
   34274             :     }
   34275             : #endif
   34276             :     *length = PyBytes_GET_SIZE(defenc);
   34277             :     return defenc_c;
   34278             : }
   34279             : #else
   34280             : static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
   34281             :     if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
   34282             : #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
   34283             :     if (likely(PyUnicode_IS_ASCII(o))) {
   34284             :         *length = PyUnicode_GET_LENGTH(o);
   34285             :         return PyUnicode_AsUTF8(o);
   34286             :     } else {
   34287             :         PyUnicode_AsASCIIString(o);
   34288             :         return NULL;
   34289             :     }
   34290             : #else
   34291             :     return PyUnicode_AsUTF8AndSize(o, length);
   34292             : #endif
   34293             : }
   34294             : #endif
   34295             : #endif
   34296             : static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
   34297             : #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
   34298             :     if (
   34299             : #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
   34300             :             __Pyx_sys_getdefaultencoding_not_ascii &&
   34301             : #endif
   34302             :             PyUnicode_Check(o)) {
   34303             :         return __Pyx_PyUnicode_AsStringAndSize(o, length);
   34304             :     } else
   34305             : #endif
   34306             : #if (!CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
   34307             :     if (PyByteArray_Check(o)) {
   34308             :         *length = PyByteArray_GET_SIZE(o);
   34309             :         return PyByteArray_AS_STRING(o);
   34310             :     } else
   34311             : #endif
   34312             :     {
   34313             :         char* result;
   34314             :         int r = PyBytes_AsStringAndSize(o, &result, length);
   34315             :         if (unlikely(r < 0)) {
   34316             :             return NULL;
   34317             :         } else {
   34318             :             return result;
   34319             :         }
   34320             :     }
   34321             : }
   34322         284 : static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   34323         284 :    int is_true = x == Py_True;
   34324         284 :    if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   34325           3 :    else return PyObject_IsTrue(x);
   34326             : }
   34327             : static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
   34328             :     int retval;
   34329             :     if (unlikely(!x)) return -1;
   34330             :     retval = __Pyx_PyObject_IsTrue(x);
   34331             :     Py_DECREF(x);
   34332             :     return retval;
   34333             : }
   34334           0 : static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
   34335           0 :     __Pyx_TypeName result_type_name = __Pyx_PyType_GetName(Py_TYPE(result));
   34336             : #if PY_MAJOR_VERSION >= 3
   34337           0 :     if (PyLong_Check(result)) {
   34338           0 :         if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
   34339             :                 "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ").  "
   34340             :                 "The ability to return an instance of a strict subclass of int is deprecated, "
   34341             :                 "and may be removed in a future version of Python.",
   34342             :                 result_type_name)) {
   34343           0 :             __Pyx_DECREF_TypeName(result_type_name);
   34344           0 :             Py_DECREF(result);
   34345           0 :             return NULL;
   34346             :         }
   34347             :         __Pyx_DECREF_TypeName(result_type_name);
   34348             :         return result;
   34349             :     }
   34350             : #endif
   34351           0 :     PyErr_Format(PyExc_TypeError,
   34352             :                  "__%.4s__ returned non-%.4s (type " __Pyx_FMT_TYPENAME ")",
   34353             :                  type_name, type_name, result_type_name);
   34354           0 :     __Pyx_DECREF_TypeName(result_type_name);
   34355           0 :     Py_DECREF(result);
   34356             :     return NULL;
   34357             : }
   34358           0 : static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
   34359             : #if CYTHON_USE_TYPE_SLOTS
   34360           0 :   PyNumberMethods *m;
   34361             : #endif
   34362           0 :   const char *name = NULL;
   34363           0 :   PyObject *res = NULL;
   34364             : #if PY_MAJOR_VERSION < 3
   34365             :   if (likely(PyInt_Check(x) || PyLong_Check(x)))
   34366             : #else
   34367           0 :   if (likely(PyLong_Check(x)))
   34368             : #endif
   34369           0 :     return __Pyx_NewRef(x);
   34370             : #if CYTHON_USE_TYPE_SLOTS
   34371           0 :   m = Py_TYPE(x)->tp_as_number;
   34372             :   #if PY_MAJOR_VERSION < 3
   34373             :   if (m && m->nb_int) {
   34374             :     name = "int";
   34375             :     res = m->nb_int(x);
   34376             :   }
   34377             :   else if (m && m->nb_long) {
   34378             :     name = "long";
   34379             :     res = m->nb_long(x);
   34380             :   }
   34381             :   #else
   34382           0 :   if (likely(m && m->nb_int)) {
   34383           0 :     name = "int";
   34384           0 :     res = m->nb_int(x);
   34385             :   }
   34386             :   #endif
   34387             : #else
   34388             :   if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
   34389             :     res = PyNumber_Int(x);
   34390             :   }
   34391             : #endif
   34392           0 :   if (likely(res)) {
   34393             : #if PY_MAJOR_VERSION < 3
   34394             :     if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
   34395             : #else
   34396           0 :     if (unlikely(!PyLong_CheckExact(res))) {
   34397             : #endif
   34398           0 :         return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
   34399             :     }
   34400             :   }
   34401           0 :   else if (!PyErr_Occurred()) {
   34402           0 :     PyErr_SetString(PyExc_TypeError,
   34403             :                     "an integer is required");
   34404             :   }
   34405             :   return res;
   34406             : }
   34407           0 : static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
   34408           0 :   Py_ssize_t ival;
   34409           0 :   PyObject *x;
   34410             : #if PY_MAJOR_VERSION < 3
   34411             :   if (likely(PyInt_CheckExact(b))) {
   34412             :     if (sizeof(Py_ssize_t) >= sizeof(long))
   34413             :         return PyInt_AS_LONG(b);
   34414             :     else
   34415             :         return PyInt_AsSsize_t(b);
   34416             :   }
   34417             : #endif
   34418           0 :   if (likely(PyLong_CheckExact(b))) {
   34419             :     #if CYTHON_USE_PYLONG_INTERNALS
   34420           0 :     if (likely(__Pyx_PyLong_IsCompact(b))) {
   34421           0 :         return __Pyx_PyLong_CompactValue(b);
   34422             :     } else {
   34423           0 :       const digit* digits = __Pyx_PyLong_Digits(b);
   34424           0 :       const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b);
   34425           0 :       switch (size) {
   34426             :          case 2:
   34427           0 :            if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
   34428           0 :              return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
   34429             :            }
   34430             :            break;
   34431             :          case -2:
   34432           0 :            if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
   34433           0 :              return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
   34434             :            }
   34435             :            break;
   34436             :          case 3:
   34437             :            if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
   34438             :              return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
   34439             :            }
   34440             :            break;
   34441             :          case -3:
   34442             :            if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
   34443             :              return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
   34444             :            }
   34445             :            break;
   34446             :          case 4:
   34447             :            if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
   34448             :              return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
   34449             :            }
   34450             :            break;
   34451             :          case -4:
   34452             :            if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
   34453             :              return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
   34454             :            }
   34455             :            break;
   34456             :       }
   34457             :     }
   34458             :     #endif
   34459           0 :     return PyLong_AsSsize_t(b);
   34460             :   }
   34461           0 :   x = PyNumber_Index(b);
   34462           0 :   if (!x) return -1;
   34463           0 :   ival = PyInt_AsSsize_t(x);
   34464           0 :   Py_DECREF(x);
   34465             :   return ival;
   34466             : }
   34467             : static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
   34468             :   if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
   34469             :     return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
   34470             : #if PY_MAJOR_VERSION < 3
   34471             :   } else if (likely(PyInt_CheckExact(o))) {
   34472             :     return PyInt_AS_LONG(o);
   34473             : #endif
   34474             :   } else {
   34475             :     Py_ssize_t ival;
   34476             :     PyObject *x;
   34477             :     x = PyNumber_Index(o);
   34478             :     if (!x) return -1;
   34479             :     ival = PyInt_AsLong(x);
   34480             :     Py_DECREF(x);
   34481             :     return ival;
   34482             :   }
   34483             : }
   34484         141 : static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
   34485         141 :   return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
   34486             : }
   34487             : static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
   34488             :     return PyInt_FromSize_t(ival);
   34489             : }
   34490             : 
   34491             : 
   34492             : /* #### Code section: utility_code_pragmas_end ### */
   34493             : #ifdef _MSC_VER
   34494             : #pragma warning( pop )
   34495             : #endif
   34496             : 
   34497             : 
   34498             : 
   34499             : /* #### Code section: end ### */
   34500             : #endif /* Py_PYTHON_H */

Generated by: LCOV version 1.16